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

Fixup remote user registration by staff

  * Auto confirm remote accounts
  * Don't send out emails for remote account activation
  * Forbid password changes on remote accounts
parent 073c714d
Branches
Tags
No related merge requests found
......@@ -604,7 +604,8 @@ class UserAccountModel extends VerySimpleModel {
}
function isPasswdResetEnabled() {
return !$this->hasStatus(UserAccountStatus::FORBID_PASSWD_RESET);
return !$this->hasStatus(UserAccountStatus::FORBID_PASSWD_RESET)
&& (!$this->backend || $this->backend == 'client');
}
function getStatus() {
......@@ -795,10 +796,14 @@ class UserAccount extends UserAccountModel {
if ($vars['forbid-pwreset-flag'])
$account->setStatus(UserAccountStatus::FORBID_PASSWD_RESET);
}
elseif ($vars['backend'] && $vars['backend'] != 'client') {
// Auto confirm remote accounts
$account->setStatus(self::CONFIRMED);
}
$account->save(true);
if ($vars['sendemail'])
if (!$account->isConfirmed() && $vars['sendemail'])
$account->sendConfirmEmail();
return $account;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment