diff --git a/admin/inc/class.admin_cmd_edit_user.inc.php b/admin/inc/class.admin_cmd_edit_user.inc.php index db88d2d9e7..9ab3d00c37 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 7507e5e7b5..e82d0a4384 100644 --- a/phpgwapi/inc/class.vfs_home_hooks.inc.php +++ b/phpgwapi/inc/class.vfs_home_hooks.inc.php @@ -61,8 +61,10 @@ class vfs_home_hooks static function editAccount($data) { if (self::LOG_LEVEL > 0) error_log(__METHOD__.'('.array2string($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']);