src/Auth.php
public function changePassword($oldPassword, $newPassword) {
		if ($this->reconfirmPassword($oldPassword)) {
			$this->changePasswordWithoutOldPassword($newPassword);
		}
		else {
			throw new InvalidPasswordException();
		}
	}
public function changePassword($oldPassword, $newPassword) {
		if ($this->reconfirmPassword($oldPassword)) {
			$this->changePasswordWithoutOldPassword($newPassword);
		}
		else {
			throw new InvalidPasswordException();
		}
	}
public function changePassword ( $ oldPassword , $ newPassword ) { if ( $ this -> reconfirmPassword ( $ oldPassword ) ) { $ this -> changePasswordWithoutOldPassword ( $ newPassword ) ; } else { throw new InvalidPasswordException ( ) ; } }
Changes the currently signed-in user's password while requiring the old password for verification

@param string $oldPassword the old password to verify account ownership
@param string $newPassword the new password that should be set
@throws NotLoggedInException if the user is not currently signed in
@throws InvalidPasswordException if either the old password has been wrong or the desired new one has been invalid
@throws TooManyRequestsException if the number of allowed attempts/requests has been exceeded
@throws AuthError if an internal problem occurred (do *not* catch)
Changes the currently signed - in user s password while requiring the old password for verification