Using user_save() gives other modules an opportunity to react to role changes. It looks like role_expire sets expirations on hook_user, for example, so you wouldn't need to do that directly if you used user_save().

user_load() is already called on the global $user, so requesting the roles again is an unnecessary database request.

Comments

svetlio’s picture

Version: » 6.x-1.x-dev
Status: Active » Fixed

Yes, you're absolutely right, I made that adjustment.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.