auth: one more locking vs. no-password issue

This commit is contained in:
Franco Fichtner 2016-12-20 07:02:45 +01:00
parent 23cf4fe10f
commit 7792d8ad7f

View File

@ -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 = '*';
}