- fresh database (existing database should also work)
- create admin "a@b" with setup.php
- DELETE FROM 'admin' WHERE username = "a@b" directly in MySQL / pgsql
- create admin "a@b" with setup.php again
- list-domains shows domain "ALL" twice
- a@b is not recognized as superadmin
The reason for the first domain is the query for domain admins in list-domain.php which does not exclude 'ALL'.
The reason for the second problem is the code in setup.php:
$result = db_query ("SELECT * FROM $table_domain_admins WHERE username='$fUsername' AND domain='ALL' AND active='1'");
if ($result['rows'] == 1)
(hint: 2 != 1)
The correct fix is to add an UNIQUE index on (username,domain) in domain_admins to avoid duplicate entries.
(To be fixed after 2.3 release because it is a corner case and adding the index might break if the database was manually modified as described before.)
Log in to post a comment.