fixed little bugs, mostly typos

This commit is contained in:
katagia 2004-10-10 11:21:54 +00:00
parent 4f1b9681ce
commit c5606519d1
4 changed files with 49 additions and 39 deletions

View File

@ -460,16 +460,16 @@ function get_preg($argument, $regexp) {
$pregexpr = '/^([[:alnum:]\\.\\ \\_-])*$/'; $pregexpr = '/^([[:alnum:]\\.\\ \\_-])*$/';
break; break;
case "homeDirectory": // Homapath, /path/...... case "homeDirectory": // Homapath, /path/......
$pregexpr = '/^[/]([[:alnum:]\\.\\ \\_-)+([/]([[:alnum:]\\.\\ \\_-)+)*$/'; $pregexpr = '/^([\/]([[:alnum:]\\.\\ \\_-])+)+$/';
break; break;
case "digit": // Normal number case "digit": // Normal number
$pregexpr = '/^[[:digit:]]*$/'; $pregexpr = '/^[[:digit:]]*$/';
break; break;
case "UNC": // UNC Path, e.g. \\server\share\folder\... case "UNC": // UNC Path, e.g. \\server\share\folder\...
$pregexpr = '/^([\][\]([a-zA-Z0-9\\.-])+([\]([[:alnum:]\\.\\ \\_-])+)+)*$/'; $pregexpr = '/^([\\\][\\\]([a-zA-Z0-9\\.-])+)([\\\]([[:alnum:]\\.\\ \\_-])+)+$/';
break; break;
case "logonscript": // path to login-script. normal unix file case "logonscript": // path to login-script. normal unix file
$pregexpr = '/^(([/])*([[:alnum:]\\.\\ \\_-])+([/]([[:alnum:]\\.\\ \\_-])+)*((\\.bat)|(\\.cmd)))*$/'; $pregexpr = '/^(([\/])*([[:alnum:]\\.\\ \\_-])+([\/]([[:alnum:]\\.\\ \\_-])+)*((\\.bat)|(\\.cmd)))*$/';
break; break;
case "workstations": // comma separated list with windows-hosts case "workstations": // comma separated list with windows-hosts
$pregexpr = '/^(([a-zA-Z0-9\\.\\_-])+(,[a-zA-Z0-9\\.\\_-])*)*$/'; $pregexpr = '/^(([a-zA-Z0-9\\.\\_-])+(,[a-zA-Z0-9\\.\\_-])*)*$/';
@ -481,11 +481,11 @@ function get_preg($argument, $regexp) {
$pregexpr = '/^([a-z0-9\\.\\_-])*$/'; $pregexpr = '/^([a-z0-9\\.\\_-])*$/';
break; break;
case 'digit2': // Same as digit but also -1 case 'digit2': // Same as digit but also -1
$pregexpr = '/^(([-][1])|([:digit:]*))$/'; $pregexpr = '/^(([-][1])|([[:digit:]]*))$/';
break; break;
} }
if ($pregexpr!='') if ($pregexpr!='')
if (preg_match($pregexpr, $argument)) return true; if (preg_match($pregexpr, $argument)) return true;
// Now we check "negative" cases, characters which are not allowed // Now we check "negative" cases, characters which are not allowed
$pregexpr = ''; $pregexpr = '';

View File

@ -827,7 +827,8 @@ class accountContainer {
// merge both option arrays and sort them. // merge both option arrays and sort them.
$options = array_merge ($input[$i][$j]['options'], $input[$i][$j]['options_selected'] ); $options = array_merge ($input[$i][$j]['options'], $input[$i][$j]['options_selected'] );
$options = array_unique($options); $options = array_unique($options);
sort($options, SORT_NUMERIC); if (get_preg($options[0], 'digit')) sort($options, SORT_NUMERIC);
else sort($options, SORT_STRING);
foreach ($options as $option) { foreach ($options as $option) {
if ($option!='') { if ($option!='') {
if (in_array($option, $input[$i][$j]['options_selected'])) echo "<option selected>" . $option . "</option>\n"; if (in_array($option, $input[$i][$j]['options_selected'])) echo "<option selected>" . $option . "</option>\n";

View File

@ -315,6 +315,7 @@ class posixAccount extends baseModule {
$this->groups[] = substr($DN, 3, strpos($DN, ',')-3); $this->groups[] = substr($DN, 3, strpos($DN, ',')-3);
} }
} }
$this->groups = sort ($this->groups);
$this->groups_orig = $this->groups; $this->groups_orig = $this->groups;
return 0; return 0;
} }
@ -491,8 +492,10 @@ class posixAccount extends baseModule {
} }
$dn_uids = $_SESSION['cache']->get_cache('uidNumber', 'posixAccount', '*'); $dn_uids = $_SESSION['cache']->get_cache('uidNumber', 'posixAccount', '*');
// get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) // get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... )
foreach ($dn_uids as $uid) $uids[] = $uid[0]; if(is_array($dn_uids)) {
if(is_array($uids)) sort ($uids, SORT_NUMERIC); foreach ($dn_uids as $uid) $uids[] = $uid[0];
sort ($uids, SORT_NUMERIC);
}
if ($this->attributes['uidNumber'][0]=='') { if ($this->attributes['uidNumber'][0]=='') {
// No id-number given // No id-number given
if ($this->orig['uidNumber'][0]=='') { if ($this->orig['uidNumber'][0]=='') {

View File

@ -43,7 +43,7 @@ class sambaSamAccount extends baseModule {
$this->messages['logonScript'][0] = array('ERROR', _('Script path'), _('Script path is invalid!')); $this->messages['logonScript'][0] = array('ERROR', _('Script path'), _('Script path is invalid!'));
$this->messages['logonScript'][1] = array('INFO', _('Script path'), _('Inserted user- or groupname in scriptpath.')); $this->messages['logonScript'][1] = array('INFO', _('Script path'), _('Inserted user- or groupname in scriptpath.'));
$this->messages['workstations'][0] = array('ERROR', _('Samba workstations'), _('Please enter a comma separated list of host names!')); $this->messages['workstations'][0] = array('ERROR', _('Samba workstations'), _('Please enter a comma separated list of host names!'));
$this->messages['sambaLMPassword'][0] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'), 'sambaLMPassword'); $this->messages['sambaLMPassword'][0] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'));
$this->messages['sambaLMPassword'][1] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !')); $this->messages['sambaLMPassword'][1] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !'));
$this->messages['rid'][0] = array('ERROR', _('Special user'), _('There can be only one administrator per domain.')); $this->messages['rid'][0] = array('ERROR', _('Special user'), _('There can be only one administrator per domain.'));
$this->messages['rid'][1] = array('ERROR', _('Special user'), _('There can be only one guest per domain.')); $this->messages['rid'][1] = array('ERROR', _('Special user'), _('There can be only one guest per domain.'));
@ -251,7 +251,7 @@ class sambaSamAccount extends baseModule {
/* Write variables into object and do some regexp checks /* Write variables into object and do some regexp checks
*/ */
function proccess_attributes($post, $profile=false) { function proccess_attributes($post, $profile=false) {
// Load attributes // Save attributes
$this->attributes['sambaDomainName'][0] = $post['sambaDomainName']; $this->attributes['sambaDomainName'][0] = $post['sambaDomainName'];
// Get Domain SID from name // Get Domain SID from name
$sambaDomains = search_domains($_SESSION['config']->get_domainSuffix()); $sambaDomains = search_domains($_SESSION['config']->get_domainSuffix());
@ -259,7 +259,6 @@ class sambaSamAccount extends baseModule {
if ($this->attributes['sambaDomainName'][0] == $sambaDomains[$i]->name) { if ($this->attributes['sambaDomainName'][0] == $sambaDomains[$i]->name) {
$SID = $sambaDomains[$i]->SID; $SID = $sambaDomains[$i]->SID;
} }
$flag = "["; $flag = "[";
if ($post['sambaAcctFlagsD']) $flag .= "D"; if ($post['sambaAcctFlagsD']) $flag .= "D";
if ($post['sambaAcctFlagsX']) $flag .= "X"; if ($post['sambaAcctFlagsX']) $flag .= "X";
@ -277,8 +276,7 @@ class sambaSamAccount extends baseModule {
if ($_SESSION[$this->base]->type=='host') { if ($_SESSION[$this->base]->type=='host') {
$this->attributes['sambaPrimaryGroupSID'][0] = $SID."-".$this->rids[_('Domain Computers')]; $this->attributes['sambaPrimaryGroupSID'][0] = $SID."-".$this->rids[_('Domain Computers')];
if ($post['ResetSambaPassword']) { if ($post['ResetSambaPassword']) {
// *** fixme. What is the default password? $this->sambaLMPassword($_SESSION[$this->base]->module['posixAccount']->attributes['uid'][0]);
$this->sambaLMPassword('');
$_SESSION[$this->base]->module['posixAccount']->userPassword(''); $_SESSION[$this->base]->module['posixAccount']->userPassword('');
} }
} }
@ -303,16 +301,18 @@ class sambaSamAccount extends baseModule {
} }
if (!$wrid) $this->attributes['sambaPrimaryGroupSID'][0] = $SID."-".($_SESSION[$this->base]->module['posixAccount']->attributes['gidNumber'][0]*2)+$RIDbase+1; if (!$wrid) $this->attributes['sambaPrimaryGroupSID'][0] = $SID."-".($_SESSION[$this->base]->module['posixAccount']->attributes['gidNumber'][0]*2)+$RIDbase+1;
if (isset($post['sambaLMPassword']) && !$profile) {
if ($post['sambaLMPassword'] != $post['sambaLMPassword2']) {
$errors[] = $this->messages['sambaLMPassword'][0];
unset ($post['sambaLMPassword2']);
}
else $this->sambaLMPassword($post['sambaLMPassword']);
}
if ($post['useunixpwd']) $this->useunixpwd = true; if ($post['useunixpwd']) $this->useunixpwd = true;
else $this->useunixpwd = false; else $this->useunixpwd = false;
if (isset($post['sambaLMPassword']) && !$profile) {
if ($post['sambaLMPassword'] != $post['sambaLMPassword2']) {
$errors['sambaLMPassword'][] = $this->messages['sambaLMPassword'][0];
unset ($post['sambaLMPassword2']);
}
else {
if ( !get_preg($this->sambaLMPassword(), 'password')) $errors['sambaLMPassword'][] = $this->messages['sambaLMPassword'][1];
else $this->sambaLMPassword($post['sambaLMPassword']);
}
}
if (!$profile) { if (!$profile) {
if ($post['sambaSID']== _('Administrator')) { if ($post['sambaSID']== _('Administrator')) {
$this->attributes['sambaSID'][0] = $SID."-500"; $this->attributes['sambaSID'][0] = $SID."-500";
@ -329,19 +329,19 @@ class sambaSamAccount extends baseModule {
// Check values // Check values
$this->attributes['sambaHomePath'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaHomePath'][0]); $this->attributes['sambaHomePath'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaHomePath'][0]);
$this->attributes['sambaHomePath'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaHomePath'][0]); $this->attributes['sambaHomePath'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaHomePath'][0]);
if ($this->attributes['sambaHomePath'][0] != stripslashes($post['sambaHomePath'])) $errors['sambaHomePath'][] = array('INFO', _('Home path'), _('Inserted user- or groupname in HomePath.')); if ($this->attributes['sambaHomePath'][0] != stripslashes($post['sambaHomePath'])) $errors['sambaHomePath'][] = $this->messages['homePath'][1];
$this->attributes['sambaLogonScript'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaLogonScript'][0]); $this->attributes['sambaLogonScript'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaLogonScript'][0]);
$this->attributes['sambaLogonScript'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaLogonScript'][0]); $this->attributes['sambaLogonScript'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaLogonScript'][0]);
if ($this->attributes['sambaLogonScript'][0] != stripslashes($post['sambaLogonScript'])) $errors['sambaLogonScript'][] = array('INFO', _('Logon script'), _('Inserted user- or groupname in logon script.')); if ($this->attributes['sambaLogonScript'][0] != stripslashes($post['sambaLogonScript'])) $errors['sambaLogonScript'][] = $this->messages['logonScript'][1];
$this->attributes['sambaProfilePath'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaProfilePath'][0]); $this->attributes['sambaProfilePath'][0] = str_replace('$user', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['uid'][0], $this->attributes['sambaProfilePath'][0]);
$this->attributes['sambaProfilePath'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaProfilePath'][0]); $this->attributes['sambaProfilePath'][0] = str_replace('$group', $_SESSION[$this->base]->module['inetOrgPerson']->attributes['gid'][0], $this->attributes['sambaProfilePath'][0]);
if ($this->attributes['sambaProfiletPath'][0] != stripslashes($post['sambaProfilePath'])) $errors['sambaProfilePath'][] = array('INFO', _('Profile path'), _('Inserted user- or groupname in profilepath.')); if ($this->attributes['sambaProfilePath'][0] != stripslashes($post['sambaProfilePath'])) $errors['sambaProfilePath'][] = $this->messages['profilePath'][1];
if ( (!$this->attributes['sambaHomePath'][0]=='') && (!get_preg($this->attributes['sambaHomePath'][0], 'UNC'))) if ( (!$this->attributes['sambaHomePath'][0]=='') && (!get_preg($this->attributes['sambaHomePath'][0], 'UNC')))
$errors['sambaHomePath'][] = $this->messages['homePath'][0]; $errors['sambaHomePath'][] = $this->messages['homePath'][0];
if ( !get_preg($this->sambaLMPassword(), 'password')) $errors['sambaLMPassword'][] = $this->messages['sambaLMPassword'][1];
if ( (!$this->attributes['sambaLogonScript'][0]=='') && (!get_preg($this->attributes['sambaLogonScript'][0], 'logonscript'))) if ( (!$this->attributes['sambaLogonScript'][0]=='') && (!get_preg($this->attributes['sambaLogonScript'][0], 'logonscript')))
$errors['sambaScriptPath'][] = $this->messages['logonScript'][0]; $errors['sambaScriptPath'][] = $this->messages['logonScript'][0];
if (!($this->attributes['sambaProfilePath'][0] == '') && !get_preg($this->attributes['sambaProfilePath'][0], 'UNC')) if (!($this->attributes['sambaProfilePath'][0] == '') &&
!(get_preg($this->attributes['sambaProfilePath'][0], 'UNC') xor get_preg($this->attributes['sambaProfilePath'][0], 'homeDirectory')))
$errors['sambaProfilePath'][] = $this->messages['profilePath'][0]; $errors['sambaProfilePath'][] = $this->messages['profilePath'][0];
} }
else { else {
@ -353,7 +353,6 @@ class sambaSamAccount extends baseModule {
$sambaProfilePath = str_replace('$group', 'group', $sambaProfilePath); $sambaProfilePath = str_replace('$group', 'group', $sambaProfilePath);
if ( (!$this->attributes['sambaHomePath'][0]=='') && (!get_preg($this->attributes['sambaHomePath'][0], 'UNC'))) if ( (!$this->attributes['sambaHomePath'][0]=='') && (!get_preg($this->attributes['sambaHomePath'][0], 'UNC')))
$errors[] = $this->messages['homePath'][0]; $errors[] = $this->messages['homePath'][0];
if ( !get_preg($this->sambaLMPassword(), 'UNC')) $errors[] = $this->messages['sambaLMPassword'][1];
if ( (!$this->attributes['sambaLogonScript'][0]=='') && (!get_preg($this->attributes['sambaLogonScript'][0], 'logonscript'))) if ( (!$this->attributes['sambaLogonScript'][0]=='') && (!get_preg($this->attributes['sambaLogonScript'][0], 'logonscript')))
$errors[] = $this->messages['logonScript'][0]; $errors[] = $this->messages['logonScript'][0];
if ( (!$this->attributes['sambaProfilePath'][0]=='') && (!get_preg($this->attributes['sambaProfilePath'][0], 'UNC')) if ( (!$this->attributes['sambaProfilePath'][0]=='') && (!get_preg($this->attributes['sambaProfilePath'][0], 'UNC'))
@ -444,6 +443,11 @@ class sambaSamAccount extends baseModule {
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Samba password') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Samba password') ),
1 => array ( 'kind' => 'input', 'name' => 'sambaLMPassword', 'type' => 'password', 'size' => '20', 'maxlength' => '255', 'value' => $password)); 1 => array ( 'kind' => 'input', 'name' => 'sambaLMPassword', 'type' => 'password', 'size' => '20', 'maxlength' => '255', 'value' => $password));
if ($post['sambaLMPassword2']!='') $password2 = $post['sambaLMPassword2']; if ($post['sambaLMPassword2']!='') $password2 = $post['sambaLMPassword2'];
else $password2 = $password;
if ($this->useunixpwd) {
$password = $_SESSION[$this->base]->module['posixAccount']->userPassword();
$password2 = $password;
}
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Repeat password') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Repeat password') ),
1 => array ( 'kind' => 'input', 'name' => 'sambaLMPassword2', 'type' => 'password', 'size' => '20', 'maxlength' => '255', 'value' => $password2), 1 => array ( 'kind' => 'input', 'name' => 'sambaLMPassword2', 'type' => 'password', 'size' => '20', 'maxlength' => '255', 'value' => $password2),
2 => array ('kind' => 'help', 'value' => 'sambaLMPassword')); 2 => array ('kind' => 'help', 'value' => 'sambaLMPassword'));
@ -456,36 +460,36 @@ class sambaSamAccount extends baseModule {
$checked = false; $checked = false;
if (strpos($this->attributes['sambaAcctFlags'][0], "N")) $checked = true; if (strpos($this->attributes['sambaAcctFlags'][0], "N")) $checked = true;
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Use no password') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Use no password') ),
1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsN', 'type' => 'checkbox', 'checked' => $checked), 1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsN', 'type' => 'checkbox', 'checked' => $checked, 'value' => 'true'),
2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsN')); 2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsN'));
$checked = false; $checked = false;
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $checked = true; if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $checked = true;
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password does not expire') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password does not expire') ),
1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsX', 'type' => 'checkbox', 'checked' => $checked), 1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsX', 'type' => 'checkbox', 'checked' => $checked, 'value' => 'true'),
2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsX')); 2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsX'));
$checked = false; $checked = false;
if (strpos($this->attributes['sambaScctFlags'][0], "D")) $checked = true; if (strpos($this->attributes['sambaAcctFlags'][0], "D")) $checked = true;
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Account is deactivated') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Account is deactivated') ),
1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsD', 'type' => 'checkbox', 'checked' => $checked), 1 => array ( 'kind' => 'input', 'name' => 'sambaAcctFlagsD', 'type' => 'checkbox', 'checked' => $checked, 'value' => 'true'),
2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsD')); 2 => array ('kind' => 'help', 'value' => 'sambaAcctFlagsD'));
for ( $i=1; $i<=31; $i++ ) $mday[] = $i; for ( $i=1; $i<=31; $i++ ) $mday[] = $i;
for ( $i=1; $i<=12; $i++ ) $mon[] = $i; for ( $i=1; $i<=12; $i++ ) $mon[] = $i;
for ( $i=2003; $i<=2030; $i++ ) $year[] = $i; for ( $i=2003; $i<=2030; $i++ ) $year[] = $i;
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('User can change password') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('User can change password') ),
1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_day', 1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_day',
'options' => $mday, 'options_selectd' => $canchangedate['mday']), 'options' => $mday, 'options_selected' => array($canchangedate['mday'])),
1 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_mon', 1 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_mon',
'options' => $mon, 'options_selectd' => $canchangedate['mon']), 'options' => $mon, 'options_selected' => array($canchangedate['mon'])),
2 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_yes', 2 => array ( 'kind' => 'select', 'name' => 'sambaPwdCanChange_yea',
'options' => $year, 'options_selectd' => $canchangedate['year'])))), 'options' => $year, 'options_selected' => array($canchangedate['year']))))),
2 => array ( 'kind' => 'help', 'value' => 'sambaPwdCanChange' )); 2 => array ( 'kind' => 'help', 'value' => 'sambaPwdCanChange' ));
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('User must change password') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('User must change password') ),
1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_day', 1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_day',
'options' => $mday, 'options_selectd' => $mustchangedate['mday']), 'options' => $mday, 'options_selected' => array($mustchangedate['mday'])),
1 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_mon', 1 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_mon',
'options' => $mon, 'options_selectd' => $mustchangedate['mon']), 'options' => $mon, 'options_selected' => array($mustchangedate['mon'])),
2 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_yes', 2 => array ( 'kind' => 'select', 'name' => 'sambaPwdMustChange_yea',
'options' => $year, 'options_selectd' => $mustchangedate['year'])))), 'options' => $year, 'options_selected' => array($mustchangedate['year']))))),
2 => array ( 'kind' => 'help', 'value' => 'sambaPwdMustChange' )); 2 => array ( 'kind' => 'help', 'value' => 'sambaPwdMustChange' ));
for ($i=90; $i>67; $i--) $drives[] = chr($i).':'; for ($i=90; $i>67; $i--) $drives[] = chr($i).':';
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Home drive') ), $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Home drive') ),
@ -521,6 +525,8 @@ class sambaSamAccount extends baseModule {
2 => array ( 'kind' => 'help', 'value' => 'sambaPrimaryGroupSID' )); 2 => array ( 'kind' => 'help', 'value' => 'sambaPrimaryGroupSID' ));
// Display if group SID should be mapped to a well kown SID // Display if group SID should be mapped to a well kown SID
$wrid=false; $wrid=false;
$options = array();
$selected = array();
if ($this->attributes['sambaSID'][0]==$SID."-500") { if ($this->attributes['sambaSID'][0]==$SID."-500") {
$selected[] = _('Administrator'); $selected[] = _('Administrator');
$wrid=true; $wrid=true;