removed small bugs
This commit is contained in:
parent
dca6d7def9
commit
734045ac79
|
@ -398,8 +398,7 @@ function addhomedir($user) { // Create Homedirectory
|
|||
|
||||
function remhomedir($user) { // Remove Homedirectory
|
||||
$ldap_q = $_SESSION['ldap']->decrypt();
|
||||
//$towrite = $ldap_q[0].' '.$ldap_q[1].' '.$user.' home rem';
|
||||
$towrite = 'cn=Manager,dc=my-domain,dc=com secret '.$user.' home rem ';
|
||||
$towrite = $ldap_q[0].' '.$ldap_q[1].' '.$user.' home rem';
|
||||
exec("/usr/bin/ssh ".$_SESSION['config']->scriptServer." sudo ".$_SESSION['config']->scriptPath." $towrite", $vals);
|
||||
}
|
||||
|
||||
|
@ -591,7 +590,7 @@ function loaduser($dn) { // Will load all needed values from an existing account
|
|||
if ($attr['title'][0]) $return->personal_title = $attr['title'][0];
|
||||
if ($attr['mail'][0]) $return->personal_mail = $attr['mail'][0];
|
||||
if ($attr['telephoneNumber'][0]) $return->personal_telephoneNumber = $attr['telephoneNumber'][0];
|
||||
if ($attr['mobileTelephoneNumber'][0]) $return->personal_mobileTelephoneNumber = $attr['mobileTelephoneNumber'][0];
|
||||
if ($attr['mobile'][0]) $return->personal_mobileTelephoneNumber = $attr['mobile'][0];
|
||||
if ($attr['facsimileTelephoneNumber'][0]) $return->personal_facsimileTelephoneNumber = $attr['facsimileTelephoneNumber'][0];
|
||||
if ($attr['street'][0]) $return->personal_street = $attr['street'][0];
|
||||
if ($attr['postalCode'][0]) $return->personal_postalCode = $attr['postalCode'][0];
|
||||
|
@ -714,7 +713,7 @@ function createuser($values) { // Will create the LDAP-Account
|
|||
if ($values->personal_title!='') $attr['title'] = $values->personal_title;
|
||||
if ($values->personal_mail!='') $attr['mail'] = $values->personal_mail;
|
||||
if ($values->personal_telephoneNumber!='') $attr['telephoneNumber'] = $values->personal_telephoneNumber;
|
||||
if ($values->personal_mobileTelephoneNumber!='') $attr['mobileTelephoneNumber'] = $values->personal_mobileTelephoneNumber;
|
||||
if ($values->personal_mobileTelephoneNumber!='') $attr['mobile'] = $values->personal_mobileTelephoneNumber;
|
||||
if ($values->personal_facsimileTelephoneNumber!='') $attr['facsimileTelephoneNumber'] = $values->personal_facsimileTelephoneNumber;
|
||||
if ($values->personal_street!='') $attr['street'] = $values->personal_street;
|
||||
if ($values->personal_postalCode!='') $attr['postalCode'] = $values->personal_postalCode;
|
||||
|
@ -865,9 +864,9 @@ function modifyuser($values,$values_old) { // Will modify the LDAP-Account
|
|||
if (($values->personal_telephoneNumber != $values_old->personal_telephoneNumber) && ($values->personal_telephoneNumber ==''))
|
||||
$attr_rem['telephoneNumber'] = $values_old->personal_telephoneNumber;
|
||||
if (($values->personal_mobileTelephoneNumber != $values_old->personal_mobileTelephoneNumber) && ($values->personal_mobileTelephoneNumber!=''))
|
||||
$attr['mobileTelephoneNumber'] = $values->personal_mobileTelephoneNumber;
|
||||
$attr['mobiler'] = $values->personal_mobileTelephoneNumber;
|
||||
if (($values->personal_mobileTelephoneNumber != $values_old->personal_mobileTelephoneNumber) && ($values->personal_mobileTelephoneNumber==''))
|
||||
$attr_rem['mobileTelephoneNumber'] = $values_old->personal_mobileTelephoneNumber;
|
||||
$attr_rem['mobile'] = $values_old->personal_mobileTelephoneNumber;
|
||||
if (($values->personal_facsimileTelephoneNumber != $values_old->personal_facsimileTelephoneNumber) && ($values->personal_facsimileTelephoneNumber!=''))
|
||||
$attr['facsimileTelephoneNumber'] = $values->personal_facsimileTelephoneNumber;
|
||||
if (($values->personal_facsimileTelephoneNumber != $values_old->personal_facsimileTelephoneNumber) && ($values->personal_facsimileTelephoneNumber==''))
|
||||
|
|
|
@ -32,12 +32,12 @@ include_once('../lib/pdf.inc'); // Return a pdf-file
|
|||
|
||||
|
||||
$error = "0";
|
||||
initvars($_GET['type'], $_GET['DN']); // Initialize alle needed vars
|
||||
initvars($_GET['type'], $_GET['DN']); // Initialize all needed vars
|
||||
|
||||
switch ($_POST['select']) {
|
||||
case 'general':
|
||||
if (!$_POST['load']) { // No Profile was loaded
|
||||
// Write alle values in temporary object
|
||||
// Write all values in temporary object
|
||||
if ($_POST['f_general_username']) $_SESSION['account']->general_username = $_POST['f_general_username'];
|
||||
else $_SESSION['account']->general_username = $_POST['f_general_username'];
|
||||
if ($_POST['f_general_surname']) $_SESSION['account']->general_surname = $_POST['f_general_surname'];
|
||||
|
@ -71,7 +71,7 @@ switch ($_POST['select']) {
|
|||
}
|
||||
break;
|
||||
case 'unix':
|
||||
// Write alle values in temporary object
|
||||
// Write all values in temporary object
|
||||
if ($_POST['f_unix_password']) $_SESSION['account']->unix_password = $_POST['f_unix_password'];
|
||||
else $_SESSION['account']->unix_password = '';
|
||||
if ($_POST['genpass']) { $_SESSION['account']->unix_password = genpasswd(); }
|
||||
|
@ -103,7 +103,7 @@ switch ($_POST['select']) {
|
|||
if ($_POST['back']) $select_local = 'general';
|
||||
break;
|
||||
case 'samba':
|
||||
// Write alle values in temporary object
|
||||
// Write all values in temporary object
|
||||
if ($_POST['f_smb_password']) $_SESSION['account']->smb_password = $_POST['f_smb_password'];
|
||||
else $_SESSION['account']->smb_password = "";
|
||||
if ($_POST['f_smb_password_no']) $_SESSION['account']->smb_password_no = true;
|
||||
|
@ -662,7 +662,7 @@ switch ($select_local) {
|
|||
echo _('Profile Path');
|
||||
echo '</td><td><input name="f_smb_profilePath" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->smb_profilePath . '">
|
||||
</td><td>';
|
||||
echo _('Path of the userprofile. Can be a local absolute path or a UNC-path (\\\\server\share). $user and $group are replaced with user- and groupname. Can be left empty.');
|
||||
echo _('Path of the userprofile. Can be a local absolute path or a UNC-path (\\\\server\\share). $user and $group are replaced with user- and groupname. Can be left empty.');
|
||||
echo '</td></tr><tr><td>';
|
||||
echo _('User Workstations');
|
||||
echo '</td><td><input name="f_smb_smbuserworkstations" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->smb_smbuserworkstations . '">
|
||||
|
@ -672,7 +672,7 @@ switch ($select_local) {
|
|||
echo _('smb Home');
|
||||
echo '</td><td><input name="f_smb_smbhome" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->smb_smbhome . '">
|
||||
</td><td>';
|
||||
echo _('UNC-path (\\\\server\share) of homedirectory. $user and $group are replaced with user- and groupname. Can be left empty.');
|
||||
echo _('UNC-path (\\\\server\\share) of homedirectory. $user and $group are replaced with user- and groupname. Can be left empty.');
|
||||
echo '</td></tr><tr><td>';
|
||||
echo _('Domain');
|
||||
echo '</td><td><input name="f_smb_domain" type="text" size="20" maxlength="20" value="' . $_SESSION['account']->smb_domain . '">
|
||||
|
|
Loading…
Reference in New Issue