bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

auth_user and users tables have different email addresses

VERIFIED FIXED

Status

Marketplace
Code Quality
P1
normal
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: eviljeff, Assigned: ashort)

Tracking

Points:
---

Details

(Whiteboard: p=3)

(Reporter)

Description

5 years ago
select au.id, au.first_name, au.last_name, us.display_name, au.email, us.email
FROM
(select id,  first_name,  last_name, email from auth_user) AS au
JOIN
(select id, display_name, email from users) AS us ON (au.id=us.id)
WHERE au.email <> us.email
group by au.id; 

8490 rows in set (!)

I believe its because auth_user isn't updated, whereas users is.  Filed under Code Quality but who knows what other random bugs it causes - sentry always uses auth_user, for example.
(Assignee)

Updated

5 years ago
Depends on: 843394
Priority: -- → P3
Whiteboard: p=3
Along with bug 850885 we could perhaps have a custom auth model and not have 2 separate tables for these.
(Assignee)

Updated

5 years ago
Assignee: nobody → ashort
Priority: P3 → P1
(Reporter)

Comment 2

5 years ago
(In reply to Rob Hudson [:robhudson] from comment #1)
> Along with bug 850885 we could perhaps have a custom auth model and not have
> 2 separate tables for these.

this seems (from my naive perspective) to be a sensible solution.  Note that this would make this bug depends on 850885 which is currently a P4 (v. P1 for this bug).
(Assignee)

Comment 3

5 years ago
Switching to Django 1.5 seems like a good idea but it looks like a big undertaking. I think I'd like to fix the immediate problem first before tackling the bigger issues surrounding login and user accounts. For instance, if we're going to get rid of the `auth_user` table we should probably think about getting rid of passwords as well -- and that can't be done without some time and effort.
(Reporter)

Comment 4

5 years ago
(In reply to Allen Short [:ashort] from comment #3)
> I think I'd like to fix the immediate problem first before
> tackling the bigger issues surrounding login and user accounts. For
> instance, if we're going to get rid of the `auth_user` table we should
> probably think about getting rid of passwords as well -- and that can't be
> done without some time and effort.

Marketplace doesn't use passwords so we're good on that front :) AMO is more of an issue...

But I agree with your general point about fixing the immediate issues.
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 905984
(Reporter)

Comment 6

5 years ago
I logged in on -dev and the email address in auth_user doesn't seem to have been updated with the one in users.  

The most visible symptom of this at the moment is the email address displayed in /settings is the one in auth_user not users - so in my case (and up to 9000 others) its wrong.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Assignee)

Comment 7

5 years ago
https://github.com/mozilla/zamboni/commit/d4b0e04ea

Part of the problem was in the response code after login in the API.
Logins to Marketplace should now use and report the email address set on AMO.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 8

5 years ago
I've verified the symptom is fixed.

But is the underlying issue in comment #0 fixed?  I.e. is auth_user now going to have the correct email address?
Status: RESOLVED → VERIFIED
Flags: needinfo?(ashort)
(Assignee)

Updated

4 years ago
Flags: needinfo?(ashort)
You need to log in before you can comment on or make changes to this bug.