user_save(), even when inserting a new user, does a db_delete('user_roles') "just to be safe" - this is responsible for 1 of the 13 database queries we issue when saving a new user. Since it's impossible for a user to have any roles when this code executes, there's no reason for it to be there.
The same code, with the same comment, has been in there since 4.6.
| Comment | File | Size | Author |
|---|---|---|---|
| user_roles_no_op_delete.patch | 928 bytes | catch |
Comments
Comment #1
moshe weitzman commentedbe gone crufty cruft
Comment #2
dries commentedCommitted to CVS HEAD. Thanks.