forked from extern/egroupware
fixed not working rename of account_lid with admin/admin-cli.php, corrupted sqlfs (overwrite /home)
This commit is contained in:
parent
69da1000b2
commit
938b7cf391
@ -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'])))
|
||||
{
|
||||
|
@ -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']);
|
||||
|
Loading…
Reference in New Issue
Block a user