Commit 7792d8ad authored by Franco Fichtner's avatar Franco Fichtner

auth: one more locking vs. no-password issue

parent 23cf4fe1
......@@ -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 = '*';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment