Ticket #487 (closed defect: fixed)
multiple user accounts shown for linked addresses - domain admin view
| Reported by: | dmorton | Owned by: | dmorton |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.3 |
| Component: | PHP scripts | Version: | 1.0.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Chris Paul reports:
I created two new domains (test1.com, test2.com) with three new users (test1@test1.com, test2@test1.com, test3@test1.com). Each user has aliases for both domains (test1@test1.com, alias: test1@test2.com). I logged in as "test1@test1.com" which linked the main mail address to the quarantine (test1@test1.com). Then I used an admin account to add "test1@test2.com" as an alias to the "test1@test1.com" account. Now I see two users. "test1@test1.com" is listed twice if you do a user lookup on "*" and in the "User Account" selection window under "Link E-mail address/alias".
I think the issue can be seen in xadminusers.php near line 314 ...
foreach ($domain_name as $dname) {
// List only the Regular (U)sers with e-mail addresses within the
// domains administered by this admin.
$select = "SELECT DISTINCT maia_users.user_name, maia_users.id "
This does not get a truly distinct list, since subsequent runs through the loop may result in duplicates.
This does not appear cause data corruption, since it's just a view of the same data.
The fix would probably be to either use a "IN" clause in the sql to grab it all at once, or if that has the potential to be too large, stick the data into a hash to make sure it is only displayed once.
Change History
Note: See
TracTickets for help on using
tickets.

