mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
auth: one more locking vs. no-password issue
This commit is contained in:
parent
23cf4fe10f
commit
7792d8ad7f
@ -392,7 +392,7 @@ function local_sync_accounts()
|
||||
}
|
||||
}
|
||||
|
||||
function local_user_set(&$user, $force_unlock = false)
|
||||
function local_user_set(&$user, $force_password = false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -410,7 +410,7 @@ function local_user_set(&$user, $force_unlock = false)
|
||||
$user_home = "/home/{$user_name}";
|
||||
$user_shell = '/sbin/nologin';
|
||||
$user_group = 'nobody';
|
||||
$lock_account = $force_unlock ? 'unlock' : 'lock';
|
||||
$lock_account = 'lock';
|
||||
|
||||
@mkdir('/home', 0755);
|
||||
|
||||
@ -429,8 +429,8 @@ function local_user_set(&$user, $force_unlock = false)
|
||||
$lock_account = 'unlock';
|
||||
}
|
||||
|
||||
/* passwords only when integrated auth is disabled */
|
||||
if (empty($config['system']['disableintegratedauth'])) {
|
||||
/* passwords only when integrated auth is disabled or forced */
|
||||
if (!$force_password && empty($config['system']['disableintegratedauth'])) {
|
||||
$user_pass = '*';
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user