fix: [user creation] Don't create an advanced authkey by default when creating a new user

- nobody will see the initial key, users can always create API keys for themselves
pull/7984/head
iglocska 2021-11-18 23:04:32 +01:00
parent 96f6b5cd4d
commit 606962b21b
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ class UsersController extends AppController
$notification_message .= ' ' . __('User notification of new credentials could not be send.');
}
}
if (!empty(Configure::read('Security.advanced_authkeys'))) {
if (!empty(Configure::read('Security.advanced_authkeys')) && $this->_isRest()) {
$this->loadModel('AuthKey');
$newKey = $this->AuthKey->createnewkey($this->User->id);
}