Simplify session flag handling in password update flow

This commit is contained in:
netkas 2025-01-06 04:48:26 -05:00
parent 746744eb64
commit ecdd9e1228

View file

@ -50,11 +50,8 @@
PasswordManager::setPassword($request->getPeer(), $rpcRequest->getParameter('password')); PasswordManager::setPassword($request->getPeer(), $rpcRequest->getParameter('password'));
// Remove the SET_PASSWORD flag & update the session flow if necessary // Remove the SET_PASSWORD flag & update the session flow if necessary
if($request->getSession()->flagExists(SessionFlags::SET_PASSWORD))
{
SessionManager::updateFlow($request->getSession(), [SessionFlags::SET_PASSWORD]); SessionManager::updateFlow($request->getSession(), [SessionFlags::SET_PASSWORD]);
} }
}
catch(Exception $e) catch(Exception $e)
{ {
throw new StandardException('Failed to set password due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e); throw new StandardException('Failed to set password due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e);