diff --git a/lam/lib/profiles.inc b/lam/lib/profiles.inc index 82609320..f2a59a41 100644 --- a/lam/lib/profiles.inc +++ b/lam/lib/profiles.inc @@ -156,6 +156,10 @@ function loadUserProfile($profile) { $acc->smb_flagsD = chop(substr($line, 12, strlen($line)-12)); continue; } + if (substr($line, 0, 12) == "smb_flagsX: ") { + $acc->smb_flagsX = chop(substr($line, 12, strlen($line)-12)); + continue; + } if (substr($line, 0, 15) == "smb_homedrive: ") { $acc->smb_homedrive = chop(substr($line, 15, strlen($line)-15)); continue; @@ -419,6 +423,7 @@ function saveUserProfile($account, $profile) { if (isset($account->smb_password_no)) fputs($file, "smb_password_no: " . $account->smb_password_no . "\n"); if (isset($account->smb_useunixpwd)) fputs($file, "smb_useunixpwd: " . $account->smb_useunixpwd . "\n"); if (isset($account->smb_flagsD)) fputs($file, "smb_flagsD: " . $account->smb_flagsD . "\n"); + if (isset($account->smb_flagsX)) fputs($file, "smb_flagsX: " . $account->smb_flagsX . "\n"); if (isset($account->smb_homedrive)) fputs($file, "smb_homedrive: " . $account->smb_homedrive . "\n"); if (isset($account->smb_scriptPath)) fputs($file, "smb_scriptPath: " . $scriptPath . "\n"); if (isset($account->smb_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n"); diff --git a/lam/templates/profedit/profilecreate.php b/lam/templates/profedit/profilecreate.php index 0aef2472..cecdf192 100644 --- a/lam/templates/profedit/profilecreate.php +++ b/lam/templates/profedit/profilecreate.php @@ -171,6 +171,14 @@ if ($_GET['type'] == "user") { echo ("

" . _("Back to Profile Editor") . ""); exit; } + if (($_POST['smb_flagsX'] == "1") || ($_POST['smb_flagsX'] == "0")) { + $acct->smb_flagsX = $_POST['smb_flagsX']; + } + else { + StatusMessage("ERROR", _("Wrong parameter for Samba option: Account is disabled!"), $_POST['smb_flagsX']); + echo ("

" . _("Back to Profile Editor") . ""); + exit; + } if ($_POST['smb_homedrive'] && ereg("^[D-Z]:$", $_POST['smb_homedrive'])) { $acct->smb_homedrive = $_POST['smb_homedrive']; } diff --git a/lam/templates/profedit/profileuser.php b/lam/templates/profedit/profileuser.php index 9f3dcf23..986a667a 100644 --- a/lam/templates/profedit/profileuser.php +++ b/lam/templates/profedit/profileuser.php @@ -252,11 +252,21 @@ echo ("\n"); // password expires echo ("\n"); echo ("" . _("Password does not expire") . ": \n"); +echo ("\n"); +echo ("" . _("Help") . "\n"); +echo ("\n"); + +// account is disabled +echo ("\n"); +echo ("" . _("Account is deactivated") . ": \n"); echo ("\n"); -echo ("" . _("Help") . "\n"); +echo ("" . _("Help") . "\n"); echo ("\n"); // empty row