public function resetPass(Request
$request,
$uid,
$timestamp,
$hash) { $account =
$this->
currentUser();
// When processing the one-time login link, we have to make sure that a user
// isn't already logged in.
if ($account->
isAuthenticated()) { // The current user is already logged in.
if ($account->
id() ==
$uid) { user_logout();
// We need to begin the redirect process again because logging out will
// destroy the session.
return $this->
redirect( 'user.reset',
[ 'uid' =>
$uid,
'timestamp' =>
$timestamp,
'hash' =>
$hash,
] );
}