Merge pull request #8640 from righel/no-change-pwd-custom-auth

chg: do not ask users for pass change if custom_auth is required via …
pull/8646/head
Luciano Righetti 2022-10-06 10:03:15 +02:00 committed by GitHub
commit 37a794fc57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -698,6 +698,9 @@ class UsersController extends AppController
if (!isset($this->request->data['User']['disabled'])) {
$this->request->data['User']['disabled'] = false;
}
if (Configure::read('CustomAuth_enable') && Configure::read('CustomAuth_required')) {
$this->request->data['User']['change_pw'] = 0;
}
$this->request->data['User']['newsread'] = 0;
if (!$this->_isSiteAdmin()) {
$this->request->data['User']['org_id'] = $this->Auth->user('org_id');