[Web] Fix shared alias displain in user view, fixes #2274
parent
d775bf3e2b
commit
d60c6a4e56
|
@ -205,7 +205,7 @@ function admin($_action, $_data = null) {
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$usernames = (array)$_data['username'];
|
$usernames = (array)$_data['username'];
|
||||||
foreach ($usernames as $username) {
|
foreach ($usernames as $username) {
|
||||||
if ($_SESSION['mailcow_cc_role'] == $username) {
|
if ($_SESSION['mailcow_cc_username'] == $username) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'warning',
|
'type' => 'warning',
|
||||||
'log' => array(__FUNCTION__, $_action, $_data_log),
|
'log' => array(__FUNCTION__, $_action, $_data_log),
|
||||||
|
|
|
@ -406,6 +406,7 @@ function check_login($user, $pass) {
|
||||||
$user = strtolower(trim($user));
|
$user = strtolower(trim($user));
|
||||||
$stmt = $pdo->prepare("SELECT `password` FROM `admin`
|
$stmt = $pdo->prepare("SELECT `password` FROM `admin`
|
||||||
WHERE `superadmin` = '1'
|
WHERE `superadmin` = '1'
|
||||||
|
AND `active` = '1'
|
||||||
AND `username` = :user");
|
AND `username` = :user");
|
||||||
$stmt->execute(array(':user' => $user));
|
$stmt->execute(array(':user' => $user));
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
@ -632,7 +633,9 @@ function user_get_alias_details($username) {
|
||||||
));
|
));
|
||||||
$run = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$run = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
while ($row = array_shift($run)) {
|
while ($row = array_shift($run)) {
|
||||||
$data['shared_aliases'][] = $row['shared_aliases'];
|
$data['shared_aliases'][$row['shared_aliases']]['public_comment'] = htmlspecialchars($row['public_comment']);
|
||||||
|
|
||||||
|
//$data['shared_aliases'][] = $row['shared_aliases'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $pdo->prepare("SELECT `address` AS `direct_aliases`, `public_comment` FROM `alias`
|
$stmt = $pdo->prepare("SELECT `address` AS `direct_aliases`, `public_comment` FROM `alias`
|
||||||
|
|
Loading…
Reference in New Issue