changes some text.
Fixed bug with samba 2.2 Added first module, posixAccount. Not yet useable.
This commit is contained in:
parent
794548226e
commit
ce22421028
|
@ -214,7 +214,7 @@ switch ($_POST['select']) {
|
|||
if ( !ereg('.{3,20}', $account_new->general_username)) $errors[] = array('ERROR', _('Name'), _('Name must contain between 3 and 20 characters.'));
|
||||
// Check if Name starts with letter
|
||||
if ( !ereg('^([a-z]|[A-Z]).*$', $account_new->general_username))
|
||||
$errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter'));
|
||||
$errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.'));
|
||||
}
|
||||
break;
|
||||
case 'samba':
|
||||
|
|
|
@ -220,7 +220,7 @@ switch ($_POST['select']) {
|
|||
case 'general':
|
||||
if (!$_POST['load']) {
|
||||
if (($account_new->general_username != $_POST['f_general_username']) && ereg('[A-Z]$', $_POST['f_general_username']))
|
||||
$errors[] = array('WARN', _('Username'), _('You are using a capital letters. This can cause problems because user and uSer could have the same mail-address.'));
|
||||
$errors[] = array('WARN', _('Username'), _('You are using a capital letters. This can cause problems because user and user could have the same mail-address.'));
|
||||
// Write all general values into $account_new if no profile should be loaded
|
||||
$account_new->general_dn = $_POST['f_general_suffix'];
|
||||
$account_new->general_username = $_POST['f_general_username'];
|
||||
|
@ -304,7 +304,7 @@ switch ($_POST['select']) {
|
|||
if ( !ereg('.{3,20}', $account_new->general_username)) $errors[] = array('ERROR', _('Name'), _('Name must contain between 3 and 20 characters.'));
|
||||
// Check if Name starts with letter
|
||||
if ( !ereg('^([a-z]|[A-Z]).*$', $account_new->general_username))
|
||||
$errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter'));
|
||||
$errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.'));
|
||||
}
|
||||
break;
|
||||
case 'unix':
|
||||
|
@ -579,10 +579,11 @@ do { // X-Or, only one if() can be true
|
|||
if (strstr($account_new->smb_profilePath, '$user')) $found = true;
|
||||
if (strstr($account_new->smb_smbhome, '$group')) $found = true;
|
||||
if (strstr($account_new->smb_smbhome, '$user')) $found = true;
|
||||
if ($found)
|
||||
if ($found) {
|
||||
// Samba page not viewed; can not create group because if missing options
|
||||
$stay = true;
|
||||
$errors[] = array("ERROR", _("Samba Options not set!"), _("Please check settings on samba page."));
|
||||
}
|
||||
}
|
||||
if (isset($account_old->general_objectClass)) {
|
||||
if (!in_array('posixAccount', $account_old->general_objectClass))
|
||||
|
|
|
@ -251,7 +251,7 @@ switch ($select) {
|
|||
if (!$stay) {
|
||||
// Display rest of meta-refreh page if there are still users to create
|
||||
echo '<tr><td><a href="masscreate.php?create=true">';
|
||||
echo _('Please press here if meta-refresh didn\'t work.');
|
||||
echo _('Click here if you are not directed to the next page.');
|
||||
echo '</a></td></tr>'."\n";
|
||||
echo '<tr><td><input name="cancel" type="submit" value="'; echo _('Cancel');
|
||||
echo '"></td></tr></table>';
|
||||
|
@ -569,12 +569,12 @@ function loadfile() {
|
|||
if ($_SESSION['accounts'][$row2]->general_group=='') $_SESSION['mass_errors'][$row2][] = array('ERROR', _('Primary group'), _('No primary group defined!'));
|
||||
// Check if Username contains only valid characters
|
||||
if ( !ereg('^([a-z]|[0-9]|[.]|[-]|[_])*$', $_SESSION['accounts'][$row2]->general_username))
|
||||
$_SESSION['mass_errors'][$row2][] = array('ERROR', _('Username'), _('Username contains invalid characters. Valid characters are: a-z, 0-9 and .-_ !'));
|
||||
$_SESSION['mass_errors'][$row2][] = array('ERROR', _('Username'), _('Username contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
|
||||
// Check if Name-length is OK. minLength=3, maxLength=20
|
||||
if ( !ereg('.{3,20}', $_SESSION['accounts'][$row2]->general_username)) $_SESSION['mass_errors'][$row2][] = array('ERROR', _('Name'), _('Name must contain between 3 and 20 characters.'));
|
||||
// Check if Name starts with letter
|
||||
if ( !ereg('^([a-z]|[A-Z]).*$', $_SESSION['accounts'][$row2]->general_username))
|
||||
$_SESSION['mass_errors'][$row2][] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter'));
|
||||
$_SESSION['mass_errors'][$row2][] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.'));
|
||||
// Personal Settings
|
||||
if ( !ereg('^(\+)*([0-9]|[ ]|[.]|[(]|[)]|[/])*$', $_SESSION['accounts'][$row2]->personal_telephoneNumber)) $_SESSION['mass_errors'][$row2][] = array('ERROR', _('Telephone number'), _('Please enter a valid telephone number!'));
|
||||
if ( !ereg('^(\+)*([0-9]|[ ]|[.]|[(]|[)]|[/])*$', $_SESSION['accounts'][$row2]->personal_mobileTelephoneNumber)) $_SESSION['mass_errors'][$row2][] = array('ERROR', _('Mobile number'), _('Please enter a valid mobile number!'));
|
||||
|
|
|
@ -92,9 +92,9 @@ if ($_POST['apply']) {
|
|||
else $_SESSION['accounts'][$row]->general_givenname = $_POST['f_general_givenname'];
|
||||
// Check if username is valid
|
||||
if ( !ereg('^([a-z]|[0-9]|[.]|[-]|[_])*$', $_POST['f_general_username']))
|
||||
$errors2[] = array('ERROR', _('Username'), _('Username contains invalid characters. Valid characters are: a-z, 0-9 and .-_ !'));
|
||||
$errors2[] = array('ERROR', _('Username'), _('Username contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
|
||||
else if ( !ereg('^([a-z]|[A-Z]).*$', $_POST['f_general_username']))
|
||||
$errors2[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter'));
|
||||
$errors2[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.'));
|
||||
else {
|
||||
// Create Array with all users in ldap and in array
|
||||
// Validate cache-array
|
||||
|
|
Loading…
Reference in New Issue