mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Fixed login id changes not being updated correctly
This commit is contained in:
parent
9b777ab06e
commit
9f88504c00
@ -34,8 +34,8 @@
|
||||
if (account_exsists($n_loginid)) {
|
||||
$error[$totalerrors++] = lang("That loginid has already been taken");
|
||||
}
|
||||
$c_loginid = $n_loginid;
|
||||
$n_loginid = $old_loginid;
|
||||
// $c_loginid = $n_loginid;
|
||||
// $n_loginid = $old_loginid;
|
||||
}
|
||||
|
||||
if ($n_passwd || $n_passwd_2) {
|
||||
@ -53,10 +53,10 @@
|
||||
|
||||
if (! $totalerrors) {
|
||||
$cd = account_edit(array("loginid" => $n_loginid, "permissions" => $new_permissions,
|
||||
"firstname" => $n_firstname, "lastname" => $n_lastname,
|
||||
"passwd" => $n_passwd, "account_status" => $n_account_status,
|
||||
"c_loginid" => $c_loginid, "account_id" => rawurldecode($account_id),
|
||||
"groups" => $phpgw->accounts->groups_array_to_string($n_groups)));
|
||||
"firstname" => $n_firstname, "lastname" => $n_lastname,
|
||||
"passwd" => $n_passwd, "account_status" => $n_account_status,
|
||||
"old_loginid" => $old_loginid, "account_id" => rawurldecode($account_id),
|
||||
"groups" => $phpgw->accounts->groups_array_to_string($n_groups)));
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("accounts.php", "cd=$cd"));
|
||||
|
@ -96,7 +96,7 @@
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
|
||||
$basedir = $phpgw_info["server"]["files_dir"] . $sep . "users" . $sep;
|
||||
|
||||
//echo "TEST: " . $basedir . $account_info["loginid"];
|
||||
if (! @mkdir($basedir . $account_info["loginid"], 0707)) {
|
||||
$cd = 36;
|
||||
} else {
|
||||
@ -111,13 +111,13 @@
|
||||
|
||||
$phpgw->db->lock(array('accounts','preferences','sessions'));
|
||||
|
||||
$lid = $account_info["loginid"];
|
||||
// $lid = $account_info["loginid"];
|
||||
|
||||
if ($account_info["c_loginid"]) {
|
||||
$phpgw->db->query("update accounts set account_lid='" . $account_info["c_loginid"]
|
||||
. "' where account_lid='" . $account_info["loginid"] . "'");
|
||||
if ($account_info["old_loginid"] != $account_info["loginid"]) {
|
||||
$phpgw->db->query("update accounts set account_lid='" . $account_info["loginid"]
|
||||
. "' where account_lid='" . $account_info["old_loginid"] . "'");
|
||||
|
||||
$account_info["loginid"] = $account_info["c_loginid"];
|
||||
// $account_info["loginid"] = $account_info["n_loginid"];
|
||||
}
|
||||
|
||||
if ($account_info["passwd"]) {
|
||||
@ -139,12 +139,12 @@
|
||||
}
|
||||
$cd = 27;
|
||||
|
||||
if ($account_info["c_loginid"] != $account_info["loginid"]) {
|
||||
if ($account_info["old_loginid"] != $account_info["loginid"]) {
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
|
||||
$basedir = $phpgw_info["server"]["files_dir"] . $sep . "users" . $sep;
|
||||
|
||||
if (! @rename($basedir . $lid, $basedir . $account_info["loginid"])) {
|
||||
if (! @rename($basedir . $account_info["old_loginid"], $basedir . $account_info["loginid"])) {
|
||||
$cd = 35;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user