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:
@@ -54,6 +54,12 @@ if (isset($_POST['submit']))
|
|||||||
if (isset($_POST['voip'])) $voip = 1;
|
if (isset($_POST['voip'])) $voip = 1;
|
||||||
if (isset($_POST['enabled'])) $enabled = 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
|
$sql = "UPDATE operator
|
||||||
SET username = " . $db->qstr($_POST['username']) . ",
|
SET username = " . $db->qstr($_POST['username']) . ",
|
||||||
lastName = " . $db->qstr($_POST['lastName']) . ",
|
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");
|
$msg = T_("Failed to update user. Please make sure the username and extension are unique");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$_GET['edit'] = $operator_id;
|
$_GET['edit'] = $operator_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user