Exemplo n.º 1
0
/**
 * handles the ajax request from modal window for: Register
 */
function td_mod_remember_pass()
{
    global $post;
    //json predifined return text
    $json_fail = json_encode(array('remember_pass', 0, __td('Email address not found!', TD_THEME_NAME)));
    //get the email address from ajax() call
    $remember_email = '';
    if (!empty($_POST['email'])) {
        $remember_email = $_POST['email'];
    }
    if (td_login::recover_password($remember_email)) {
        die(json_encode(array('remember_pass', 1, __td('Your password is reset, check your email.', TD_THEME_NAME))));
    } else {
        die($json_fail);
    }
}
Exemplo n.º 2
0
 static function on_ajax_remember_pass()
 {
     if (td_util::get_option('tds_login_sign_in_widget') != 'show') {
         exit;
     }
     //json predefined return text
     $json_fail = json_encode(array('remember_pass', 0, __td('Email address not found!', TD_THEME_NAME)));
     //get the email address from ajax() call
     $remember_email = '';
     if (!empty($_POST['email'])) {
         $remember_email = $_POST['email'];
     }
     if (td_login::recover_password($remember_email)) {
         die(json_encode(array('remember_pass', 1, __td('Your password is reset, check your email.', TD_THEME_NAME))));
     } else {
         die($json_fail);
     }
 }