diff --git a/admin/inc/class.admin_cmd_edit_user.inc.php b/admin/inc/class.admin_cmd_edit_user.inc.php index c4c067eb26..0cb89e6e9d 100644 --- a/admin/inc/class.admin_cmd_edit_user.inc.php +++ b/admin/inc/class.admin_cmd_edit_user.inc.php @@ -57,6 +57,7 @@ class admin_cmd_edit_user extends admin_cmd_change_pw if ($this->account) // existing account { $data['account_id'] = admin_cmd::parse_account($this->account); + $data['old_loginid'] = admin_cmd::$accounts->id2name($data['account_id']); } if (!$data['account_lid'] && (!$this->account || !is_null($data['account_lid']))) { diff --git a/phpgwapi/inc/class.vfs_home_hooks.inc.php b/phpgwapi/inc/class.vfs_home_hooks.inc.php index 158b9f4225..6f1b380720 100644 --- a/phpgwapi/inc/class.vfs_home_hooks.inc.php +++ b/phpgwapi/inc/class.vfs_home_hooks.inc.php @@ -50,8 +50,10 @@ class vfs_home_hooks */ static function editAccount($data) { - if ($data['account_lid'] == $data['old_loginid']) return; // nothing to do here - + if (empty($data['account_lid']) || empty($data['old_loginid']) || $data['account_lid'] == $data['old_loginid']) + { + return; // nothing to do here + } // rename the user-dir egw_vfs::$is_root = true; egw_vfs::rename('/home/'.$data['old_loginid'],'/home/'.$data['account_lid']);