Commit a73da8f2 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix undefined variable warning.

parent 4df0b93d
......@@ -90,7 +90,6 @@ function Do_ChangePassword()
return;
}
$formfields = $ajax_args["formfields"];
$this_uid = $this_user->uid();
$target_uid = $target_user->uid();
if (isset($formfields["key"])) {
......@@ -165,7 +164,14 @@ function Do_ChangePassword()
SUEXEC_ACTION_CONTINUE);
}
else {
$retval = SUEXEC($this_uid, "nobody",
if (isset($this_user)) {
$uid = $this_user->uid();
}
else {
# Forgot password, no current user.
$uid = $target_uid;
}
$retval = SUEXEC($uid, "nobody",
"webtbacct passwd $target_uid $safe_encoding",
SUEXEC_ACTION_CONTINUE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment