Example #1
0
         unset($_SESSION['rules']);
         unset($_SESSION['pauthdata']['pw_provided']);
         unset($_SESSION['pauthdata']['submitted_checked_pw']);
         if ($settings['subject_authentication'] == 'token') {
             redirect("public/");
         } else {
             redirect("public/participant_login.php");
         }
     } elseif ($response['problem']) {
         $continue = false;
     }
     if ($settings['subject_authentication'] != 'token') {
         if (isset($_SESSION['pauthdata']['pw_provided']) && $_SESSION['pauthdata']['pw_provided'] && isset($_SESSION['pauthdata']['submitted_checked_pw']) && $_SESSION['pauthdata']['submitted_checked_pw']) {
             $_REQUEST['password'] = $_SESSION['pauthdata']['submitted_checked_pw'];
         } else {
             $pw_ok = participant__check_password($_REQUEST['password'], $_REQUEST['password2']);
             if ($pw_ok) {
                 $_SESSION['pauthdata']['pw_provided'] = true;
                 $_SESSION['pauthdata']['submitted_checked_pw'] = $_REQUEST['password'];
             } else {
                 $continue = false;
             }
         }
     }
 }
 if ($continue) {
     $participant = $_REQUEST;
     unset($_SESSION['pauthdata']['pw_provided']);
     unset($_SESSION['pauthdata']['submitted_checked_pw']);
     unset($_SESSION['captcha_string']);
     $new_id = participant__create_participant_id($participant);
Example #2
0
            if (!$passold) {
                message(lang('error_please_fill_in_all_fields'));
                $continue = false;
            }
        }
        if ($continue) {
            if (!crypt_verify($passold, $participant['password_crypted'])) {
                message(lang('error_old_password_wrong'));
                message(lang('for_security_reasons_we_logged_you_out'));
                $continue = false;
                participant__logout();
                redirect("public/participant_login.php");
            }
        }
        if ($continue) {
            $continue = participant__check_password($password, $password2);
        }
        if ($continue == false) {
            message(lang('error_password_not_changed'));
            redirect("public/participant_change_pw.php");
        } else {
            participant__set_password($password, $participant['participant_id']);
            message(lang('password_changed_log_in_again'));
            log__participant("participant_password_change", $participant['participant_id']);
            log__participant("logout", $participant['participant_id']);
            participant__logout();
            redirect("public/participant_login.php?pw=true");
        }
        $proceed = false;
    }
}