Skip to content
Snippets Groups Projects
Commit 042caef5 authored by Jared Hancock's avatar Jared Hancock
Browse files

Force create passwd for staff-initiated activation mails

parent bf056365
Branches
Tags
No related merge requests found
...@@ -49,7 +49,14 @@ elseif ($_GET['token']) { ...@@ -49,7 +49,14 @@ elseif ($_GET['token']) {
$acct->confirm(); $acct->confirm();
// TODO: Log the user in // TODO: Log the user in
if ($client = UserAuthenticationBackend::processSignOn($errors)) { if ($client = UserAuthenticationBackend::processSignOn($errors)) {
$acct->cancelResetTokens(); if ($acct->hasPassword() && !$acct->get('backend')) {
$acct->cancelResetTokens();
}
// No password setup yet -- force one to be created
else {
$_SESSION['_client']['reset-token'] = $_GET['token'];
$acct->forcePasswdReset();
}
Http::redirect('account.php?confirmed'); Http::redirect('account.php?confirmed');
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment