disabled password reset for banned users, fixes #677
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
This commit is contained in:
12
index.php
12
index.php
@@ -258,6 +258,9 @@ if($action == 'login')
|
||||
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
|
||||
$message = str_replace('%s', $cmail, $lng['error']['errorsendingmail']);
|
||||
break;
|
||||
case 5:
|
||||
$message = $lng['error']['user_banned'];
|
||||
break;
|
||||
}
|
||||
|
||||
$update_in_progress = '';
|
||||
@@ -280,7 +283,7 @@ if($action == 'forgotpwd')
|
||||
{
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$email = validateEmail($_POST['loginemail'], 'email');
|
||||
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||
AND `email`='" . $db->escape($email) . "'";
|
||||
$result = $db->query($sql);
|
||||
@@ -305,6 +308,13 @@ if($action == 'forgotpwd')
|
||||
if($result !== null)
|
||||
{
|
||||
$user = $db->fetch_array($result);
|
||||
|
||||
/* Check whether user is banned */
|
||||
if($user['deactivated'])
|
||||
{
|
||||
$message = $lng['pwdreminder']['notallowed'];
|
||||
redirectTo('index.php', Array('showmessage' => '5'), true);
|
||||
}
|
||||
|
||||
if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|
||||
|| $adminchecked == false)
|
||||
|
||||
@@ -1574,3 +1574,6 @@ $lng['success']['rebuildingconfigs'] = 'Successfully inserted tasks for rebuild
|
||||
$lng['panel']['variable'] = 'Variable';
|
||||
$lng['panel']['description'] = 'Description';
|
||||
$lng['emails']['back_to_overview'] = 'Back to overview';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.20
|
||||
$lng['error']['user_banned'] = 'Your account has been banned. Please contact your administrator for further information.';
|
||||
|
||||
@@ -1556,3 +1556,6 @@ $lng['success']['rebuildingconfigs'] = 'Task für das Neuerstellen der Konfi
|
||||
$lng['panel']['variable'] = 'Variable';
|
||||
$lng['panel']['description'] = 'Beschreibung';
|
||||
$lng['emails']['back_to_overview'] = 'Zurück zur Übersicht';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.20
|
||||
$lng['error']['user_banned'] = 'Ihr Benutzerkonto wurde gesperrt. Bitte kontaktieren Sie Ihren Administrator für weitere Informationen.';
|
||||
|
||||
Reference in New Issue
Block a user