src/Auth.php
public function reconfirmPassword($password) {
		if ($this->isLoggedIn()) {
			try {
				$password = self::validatePassword($password);
			}
			catch (InvalidPasswordException $e) {
				return false;
			}

			$this->throttle([ 'reconfirmPassword', $this->getIpAddress() ], 3, (60 * 60), 4, true);

			try {
				$expectedHash = $this->db->selectValue(
					'SELECT password FROM ' . $this->makeTableName('users') . ' WHERE id = ?',
					[ $this->getUserId() ]
				);
			}
			catch (Error $e) {
				throw new DatabaseError($e->getMessage());
			}

			if (!empty($expectedHash)) {
				$validated = \password_verify($password, $expectedHash);

				if (!$validated) {
					$this->throttle([ 'reconfirmPassword', $this->getIpAddress() ], 3, (60 * 60), 4, false);
				}

				return $validated;
			}
			else {
				throw new NotLoggedInException();
			}
		}
		else {
			throw new NotLoggedInException();
		}
	}
public function reconfirmPassword($password) {
		if ($this->isLoggedIn()) {
			try {
				$password = self::validatePassword($password);
			}
			catch (InvalidPasswordException $e) {
				return false;
			}

			$this->throttle([ 'reconfirmPassword', $this->getIpAddress() ], 3, (60 * 60), 4, true);

			try {
				$expectedHash = $this->db->selectValue(
					'SELECT password FROM ' . $this->makeTableName('users') . ' WHERE id = ?',
					[ $this->getUserId() ]
				);
			}
			catch (Error $e) {
				throw new DatabaseError($e->getMessage());
			}

			if (!empty($expectedHash)) {
				$validated = \password_verify($password, $expectedHash);

				if (!$validated) {
					$this->throttle([ 'reconfirmPassword', $this->getIpAddress() ], 3, (60 * 60), 4, false);
				}

				return $validated;
			}
			else {
				throw new NotLoggedInException();
			}
		}
		else {
			throw new NotLoggedInException();
		}
	}
public function reconfirmPassword ( $ password ) { if ( $ this -> isLoggedIn ( ) ) { try { $ password = self :: validatePassword ( $ password ) ; } catch ( InvalidPasswordException $ e ) { return false ; } $ this -> throttle ( [ 'reconfirmPassword' , $ this -> getIpAddress ( ) ] , 3 , ( 60 * 60 ) , 4 , true ) ; try { $ expectedHash = $ this -> db -> selectValue ( 'SELECT password FROM ' . $ this -> makeTableName ( 'users' ) . ' WHERE id = ?' , [ $ this -> getUserId ( ) ] ) ; } catch ( Error $ e ) { throw new DatabaseError ( $ e -> getMessage ( ) ) ; } if ( ! empty ( $ expectedHash ) ) { $ validated = \ password_verify ( $ password , $ expectedHash ) ; if ( ! $ validated ) { $ this -> throttle ( [ 'reconfirmPassword' , $ this -> getIpAddress ( ) ] , 3 , ( 60 * 60 ) , 4 , false ) ; } return $ validated ; } else { throw new NotLoggedInException ( ) ; } } else { throw new NotLoggedInException ( ) ; } }
Attempts to confirm the currently signed-in user's password again

Whenever you want to confirm the user's identity again, e.g. before
the user is allowed to perform some "dangerous" action, you should
use this method to confirm that the user is who they claim to be.

For example, when a user has been remembered by a long-lived cookie
and thus {@see isRemembered} returns `true`, this means that the
user has not entered their password for quite some time anymore.

@param string $password the user's password
@return bool whether the supplied password has been correct
@throws NotLoggedInException if the user is not currently signed in
@throws TooManyRequestsException if the number of allowed attempts/requests has been exceeded
@throws AuthError if an internal problem occurred (do *not* catch)
Attempts to confirm the currently signed - in user s password again