2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Give a message if updating usernames without password

This commit is contained in:
Adam Zammit
2013-03-07 13:03:38 +11:00
parent 10c68d7d11
commit 33b3091ad3

View File

@@ -54,6 +54,12 @@ if (isset($_POST['submit']))
if (isset($_POST['voip'])) $voip = 1;
if (isset($_POST['enabled'])) $enabled = 1;
if (HTPASSWD_PATH !== false && $_POST['existing_username'] != $_POST['username'] && empty($_POST['password']))
{
$msg = T_("If changing usernames, you must specify a new password");
}
else
{
$sql = "UPDATE operator
SET username = " . $db->qstr($_POST['username']) . ",
lastName = " . $db->qstr($_POST['lastName']) . ",
@@ -84,7 +90,7 @@ if (isset($_POST['submit']))
{
$msg = T_("Failed to update user. Please make sure the username and extension are unique");
}
}
$_GET['edit'] = $operator_id;
}