fixed PHP notices
This commit is contained in:
parent
a0ac8f504e
commit
2c6751b7bb
|
@ -112,11 +112,11 @@ function lamdaemonSSH($commands, $server) {
|
|||
return $return;
|
||||
}
|
||||
$entry = @ldap_get_entries($_SESSION['ldap']->server(), $sr);
|
||||
$userName = $entry[0]['uid'][0];
|
||||
if (!$userName) {
|
||||
if (!isset($entry[0]['uid'][0])) {
|
||||
$return = array("ERROR," . _("Your LAM admin user must be a valid Unix account to work with lamdaemon!") . ",");
|
||||
return $return;
|
||||
}
|
||||
$userName = $entry[0]['uid'][0];
|
||||
if (@ssh2_auth_password($handle, $userName, $credentials[1])) {
|
||||
$shell = ssh2_exec($handle, "sudo " . $_SESSION['config']->get_scriptPath());
|
||||
fwrite($shell, $commands);
|
||||
|
|
|
@ -612,7 +612,7 @@ class posixAccount extends baseModule {
|
|||
*/
|
||||
function preDeleteActions() {
|
||||
$return = true;
|
||||
if ($_POST['deletehomedir']) {
|
||||
if (isset($_POST['deletehomedir'])) {
|
||||
// get list of lamdaemon servers
|
||||
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
|
||||
for ($i = 0; $i < sizeof($lamdaemonServers); $i++) {
|
||||
|
|
Loading…
Reference in New Issue