} else if (!empty($user->password)) {
if ($updatepasswords) {
$errmsg = null;
- $weak = check_password_policy($user->password, $errmsg);
+ $weak = !check_password_policy($user->password, $errmsg);
if ($resetpasswords == UU_PWRESET_ALL or ($resetpasswords == UU_PWRESET_WEAK and $weak)) {
if ($weak) {
$weakpasswords++;
}
unset_user_preference('create_password', $existinguser); // no need to create password any more
$existinguser->password = hash_internal_user_password($user->password);
+ $upt->track('password', $user->password, 'normal', false);
} else {
// do not print password when not changed
$upt->track('password', '', 'normal', false);
}
} else {
$errmsg = null;
- $weak = check_password_policy($user->password, $errmsg);
+ $weak = !check_password_policy($user->password, $errmsg);
if ($resetpasswords == UU_PWRESET_ALL or ($resetpasswords == UU_PWRESET_WEAK and $weak)) {
if ($weak) {
$weakpasswords++;