fixed wrong sid if gid has changed
This commit is contained in:
parent
e207d03bd0
commit
29f1acf96f
|
@ -94,6 +94,16 @@ switch ($_POST['select']) { // Select which part of page should be loaded and ch
|
|||
case 'general':
|
||||
// Write all general values into $_SESSION['account'] if no profile should be loaded
|
||||
if (!$_POST['load']) {
|
||||
// Set correct SID if GIS has changed
|
||||
if (isset($_SESSION['account_old']->general_uidNumber) && ($_SESSION['account']->general_uidNumber != $_POST['f_general_uidNumber'])
|
||||
&& ($_SESSION['config']->samba3 == 'yes')) {
|
||||
$temp = explode('-', $_SESSION['account']->smb_mapgroup);
|
||||
$SID = $temp[0].'-'.$temp[1].'-'.$temp[2].'-'.$temp[3].'-'.$temp[4].'-'.$temp[5].'-'.$temp[6];
|
||||
if ( $temp[7]!='512' && $temp[7]!='513' && $temp[7]!='514' )
|
||||
$_SESSION['account']->smb_mapgroup = $_SESSION['account']->smb_domain->SID . "-".
|
||||
(2 * $_POST['f_general_uidNumber'] + $_SESSION['account']->smb_domain->RIDbase +1);
|
||||
|
||||
}
|
||||
$_SESSION['account']->general_dn = $_POST['f_general_suffix'];
|
||||
$_SESSION['account']->general_username = $_POST['f_general_username'];
|
||||
$_SESSION['account']->general_uidNumber = $_POST['f_general_uidNumber'];
|
||||
|
|
Loading…
Reference in New Issue