/**
* Set a message at the top of the Change Password form
* @since 1.23
- * @param Message $msg to parse and add to the form header
+ * @param Message $msg Message to parse and add to the form header
*/
public function setChangeMessage( Message $msg ) {
$this->mPreTextMessage = $msg;
$request = $this->getRequest();
$oldpassMsg = $this->mOldPassMsg;
- if ( !isset( $oldpassMsg ) ) {
+ if ( $oldpassMsg === null ) {
$oldpassMsg = $user->isLoggedIn() ? 'oldpassword' : 'resetpass-temp-password';
}
}
/**
- * @throws PasswordError when cannot set the new password because requirements not met.
+ * @throws PasswordError When cannot set the new password because requirements not met.
*/
protected function attemptReset( $oldpass, $newpass, $retype ) {
global $wgPasswordAttemptThrottle;
);
}
- // @TODO Make these separate messages, since the message is written for both cases
+ // @todo Make these separate messages, since the message is written for both cases
if ( !$user->checkTemporaryPassword( $oldpass ) && !$user->checkPassword( $oldpass ) ) {
wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'wrongpassword' ) );
throw new PasswordError( $this->msg( 'resetpass-wrong-oldpass' )->text() );