Rev 1143 | Rev 1201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1143 | Rev 1199 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | throw new OIDplusException(_L('Invalid email address')); |
41 | throw new OIDplusException(_L('Invalid email address')); |
42 | } |
42 | } |
43 | 43 | ||
44 | OIDplus::getActiveCaptchaPlugin()->captchaVerify($params, 'captcha'); |
44 | OIDplus::getActiveCaptchaPlugin()->captchaVerify($params, 'captcha'); |
45 | 45 | ||
46 | OIDplus::logger()->log("[WARN]RA($email)!", "A new password for '$email' was requested (forgot password)"); |
46 | OIDplus::logger()->log("[WARN]RA(%1)!", "A new password for '%1' was requested (forgot password)", $email); |
47 | 47 | ||
48 | $timestamp = time(); |
48 | $timestamp = time(); |
49 | $activate_url = OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL) . '?goto='.urlencode('oidplus:reset_password$'.$email.'$'.$timestamp.'$'.OIDplus::authUtils()->makeAuthKey('reset_password;'.$email.';'.$timestamp)); |
49 | $activate_url = OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL) . '?goto='.urlencode('oidplus:reset_password$'.$email.'$'.$timestamp.'$'.OIDplus::authUtils()->makeAuthKey('reset_password;'.$email.';'.$timestamp)); |
50 | 50 | ||
51 | $message = $this->getForgotPasswordText($params['email']); |
51 | $message = $this->getForgotPasswordText($params['email']); |
Line 84... | Line 84... | ||
84 | if (strlen($password1) < OIDplus::config()->getValue('ra_min_password_length')) { |
84 | if (strlen($password1) < OIDplus::config()->getValue('ra_min_password_length')) { |
85 | $minlen = OIDplus::config()->getValue('ra_min_password_length'); |
85 | $minlen = OIDplus::config()->getValue('ra_min_password_length'); |
86 | throw new OIDplusException(_L('Password is too short. Need at least %1 characters',$minlen)); |
86 | throw new OIDplusException(_L('Password is too short. Need at least %1 characters',$minlen)); |
87 | } |
87 | } |
88 | 88 | ||
89 | OIDplus::logger()->log("[INFO]RA($email)!", "RA '$email' has reset his password (forgot passwort)"); |
89 | OIDplus::logger()->log("[INFO]RA(%1)!", "RA '%1' has reset his password (forgot passwort)", $email); |
90 | 90 | ||
91 | $ra = new OIDplusRA($email); |
91 | $ra = new OIDplusRA($email); |
92 | $ra->change_password($password1); |
92 | $ra->change_password($password1); |
93 | 93 | ||
94 | return array("status" => 0); |
94 | return array("status" => 0); |