From a50f4604130bea4931f8cec8f79a2bf1e00f8300 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 10 Aug 2018 20:35:24 +0200 Subject: [PATCH] app/library/Auth.php: in loginOauth() activate deleted accounts. --- app/library/Auth.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/library/Auth.php b/app/library/Auth.php index 75c622b..aec9376 100644 --- a/app/library/Auth.php +++ b/app/library/Auth.php @@ -58,6 +58,13 @@ class Auth extends Component return $user->getMessages(); } } + // Here we activate the user. + // As for OAuth we perform registration if the user does not exist. + // We should therefore activate deleted accounts. + else if ($user->Status == User::STATUS_DELETED) { + $user->Status = User::STATUS_ACTIVE; + $user->save(); + } $this->setIdentity($user->getId());