[Web] Disable API as username

This commit is contained in:
andryyy
2019-10-10 07:13:50 +02:00
parent 3124226607
commit d03e90d3c0
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ function domain_admin($_action, $_data = null) {
);
return false;
}
if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username)) || empty ($username)) {
if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username)) || empty ($username) || $username == 'API') {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),