Plugin Directory

Changeset 856577


Ignore:
Timestamp:
02/12/2014 07:02:56 PM (12 years ago)
Author:
buildcreate
Message:

Fixed registration page glitch

Location:
agreeable
Files:
1 added
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • agreeable/tags/0.1.2.1/agreeable-options.php

    r856507 r856577  
    44             
    55            $dbfail = $_POST['ag_fail'];
    6           $dbtermm = stripslashes($dbfail);
     6          $dbfail = stripslashes($dbfail);
    77            update_option('ag_fail', $dbfail);
    88         
  • agreeable/tags/0.1.2.1/agreeable.php

    r856571 r856577  
    44Plugin URI: http://wordpress.org/extend/plugins/agreeable
    55Description: Add a required "Agree to terms" checkbox to login and/or register forms.  Based on the I-Agree plugin by Michael Stursberg.
    6 Version: 0.1.2
     6Version: 0.1.2.1
    77Author: buildcreate, thesturs
    88Author URI: http://buildcreate.com
     
    1414    $dbregister = get_option('ag_register');
    1515   
    16     if(in_array($GLOBALS['pagenow'], array('wp-login.php')) && $dblogin == 1 || in_array($GLOBALS['pagenow'], array('wp-register.php', 'index.php')) && $dbregister == 1) {
     16    if($GLOBALS['pagenow'] == 'wp-login.php' && $dblogin == 1 || in_array('login', $body_class) && $dblogin == 1 || $GLOBALS['pagenow'] == 'wp-register.php' && $dbregister == 1 || in_array('register', $body_class) && $dbregister == 1 ) {
    1717   
    1818         $dbfail = get_option('ag_fail');
     
    5050   
    5151        // Add an element to the login form, which must be checked
    52         echo '<div id="terms-accept"><label><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a target="_BLANK" href="'.$dburl.'">'.$dbtermm.'</a></label></div>';
     52        echo '<div id="terms-accept"><label><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a target="_BLANK" href="'.$dburl.'">'.$dbtermm.'</a></label></div><br>';
    5353    }
    5454}
     
    6767// Add it to the appropriate hooks
    6868add_filter('wp_authenticate_user', 'wp_authenticate_user_acc', 99999, 2);
     69add_filter('registration_errors', 'wp_authenticate_user_acc', 99999, 2);
    6970add_filter('bp_signup_validate', 'wp_authenticate_user_acc', 9999, 2);
    7071
     
    106107
    107108function send_feedback() {
    108     if($_POST['feedback_email'] && $_POST['feedback_content']) {
     109    if(isset($_POST['feedback_email']) && isset($_POST['feedback_content'])) {
    109110       
    110111        $to = '[email protected]';
  • agreeable/trunk/agreeable-options.php

    r856507 r856577  
    44             
    55            $dbfail = $_POST['ag_fail'];
    6           $dbtermm = stripslashes($dbfail);
     6          $dbfail = stripslashes($dbfail);
    77            update_option('ag_fail', $dbfail);
    88         
  • agreeable/trunk/agreeable.php

    r856571 r856577  
    44Plugin URI: http://wordpress.org/extend/plugins/agreeable
    55Description: Add a required "Agree to terms" checkbox to login and/or register forms.  Based on the I-Agree plugin by Michael Stursberg.
    6 Version: 0.1.2
     6Version: 0.1.2.1
    77Author: buildcreate, thesturs
    88Author URI: http://buildcreate.com
     
    1414    $dbregister = get_option('ag_register');
    1515   
    16     if(in_array($GLOBALS['pagenow'], array('wp-login.php')) && $dblogin == 1 || in_array($GLOBALS['pagenow'], array('wp-register.php', 'index.php')) && $dbregister == 1) {
     16    if($GLOBALS['pagenow'] == 'wp-login.php' && $dblogin == 1 || in_array('login', $body_class) && $dblogin == 1 || $GLOBALS['pagenow'] == 'wp-register.php' && $dbregister == 1 || in_array('register', $body_class) && $dbregister == 1 ) {
    1717   
    1818         $dbfail = get_option('ag_fail');
     
    5050   
    5151        // Add an element to the login form, which must be checked
    52         echo '<div id="terms-accept"><label><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a target="_BLANK" href="'.$dburl.'">'.$dbtermm.'</a></label></div>';
     52        echo '<div id="terms-accept"><label><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a target="_BLANK" href="'.$dburl.'">'.$dbtermm.'</a></label></div><br>';
    5353    }
    5454}
     
    6767// Add it to the appropriate hooks
    6868add_filter('wp_authenticate_user', 'wp_authenticate_user_acc', 99999, 2);
     69add_filter('registration_errors', 'wp_authenticate_user_acc', 99999, 2);
    6970add_filter('bp_signup_validate', 'wp_authenticate_user_acc', 9999, 2);
    7071
     
    106107
    107108function send_feedback() {
    108     if($_POST['feedback_email'] && $_POST['feedback_content']) {
     109    if(isset($_POST['feedback_email']) && isset($_POST['feedback_content'])) {
    109110       
    110111        $to = '[email protected]';
Note: See TracChangeset for help on using the changeset viewer.