Users should be indentified by an ID rather than username

Bug #246011 reported by Greg A
4
Affects Status Importance Assigned to Milestone
Ubuland
Fix Released
Wishlist
Unassigned

Bug Description

In the users table, each user should have an ID. Then rather than referencing the username in the admins table the ID can be referenced. This means users could change their usernames.

Revision history for this message
David Futcher (bobbo) wrote :

Confirming, this could be useful for some users. Would the site be renamed too?

Changed in ubuland:
importance: Undecided → Low
status: New → Confirmed
importance: Low → Wishlist
Revision history for this message
Greg A (etulfetulf) wrote :

Yes, I would have thought this would be the main reason for wanting to change username.

David Futcher (bobbo)
Changed in ubuland:
milestone: none → alpha-three
Revision history for this message
David Futcher (bobbo) wrote :

I'm actually a bit confused by this. Do we need to change the current auth code? From having a quick read of it I dont think we do so this just needs to be a schema change in the admins table so we define admins using ids instead of usernames?

Changed in ubuland:
assignee: nobody → bobbo
status: Confirmed → Incomplete
Revision history for this message
Greg A (etulfetulf) wrote :

I actually didn't realise when I wrote this that users already had an ID in the users table. So that makes everything easier to implement!

Yes, we need a schema change in the admins table - and is_admin() will have to be adjusted. We might want a getIDfromUsername() as well.

I don't think much (if any) of the other auth code will change.

David Futcher (bobbo)
Changed in ubuland:
status: Incomplete → In Progress
Revision history for this message
David Futcher (bobbo) wrote :

Fix committed in -devel revision 187. is_admin() now looks for user id instead of username, updated the admins table schema.

Changed in ubuland:
assignee: bobbo → nobody
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.