Module should not directly manipulate users_roles table

rfay - December 29, 2008 - 00:29
Project:Apply for role
Version:6.x-1.8
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The module should use user_save() or similar mechanism to update the user's roles. Currently it is directly manipulating the database. This means that other modules cannot act on role changes, because they never get notified. Role Change Notify for example, can't send out role change notification messages. Workflow can't take action, etc.

Attached is a patch that uses user_save() to do the change to roles both on approve and deny.

AttachmentSize
user_save_mod.patch1018 bytes

#1

VM - December 29, 2008 - 00:45

sweet patch!

#2

Soren Jones - December 29, 2008 - 01:00
Status:needs review» fixed

Thank you!

Applied to -dev.

S.

#3

System Message - January 12, 2009 - 01:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.