예제 #1
0
         $error = true;
         $error_msg .= (isset($error_msg) ? '<br />' : '') . $lang['Password_long'];
     } else {
         if ($mode == 'editprofile') {
             $login_result = login_db($username, $cur_password, $user_id, false);
             if ($login_result['status'] !== LOGIN_SUCCESS) {
                 $error = true;
                 $error_msg .= (isset($error_msg) ? '<br />' : '') . $lang['Current_password_mismatch'];
             }
         }
         if (!$error) {
             // PROFILE EDIT BRIDGE - BEGIN
             $target_profile_data['password'] = $new_password;
             // PROFILE EDIT BRIDGE - END
             // CrackerTracker v5.x
             $profile_security->pw_create_date($user_id);
             // CrackerTracker v5.x
             //$new_password = md5($new_password);
             $passwd_sql = "user_password = '******', ";
         }
     }
 } elseif (empty($new_password) && !empty($password_confirm) || !empty($new_password) && empty($password_confirm)) {
     $error = true;
     $error_msg .= (isset($error_msg) ? '<br />' : '') . $lang['Password_mismatch'];
 }
 // Do a ban check on this email address
 //if (($email != $user->data['user_email']) || ($mode == 'register'))
 if ($email != $user->data['user_email'] || $email_confirm != $user->data['user_email'] || $email != $email_confirm || $mode == 'register') {
     $result = validate_email($email);
     if (!empty($result['error'])) {
         $email = $user->data['user_email'];