Module should use user_save instead of directly accessing drupal database (drupal5 patch)

rfay - December 1, 2008 - 14:07
Project:Role Delegation
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This module uses direct database manipulation instead of using user_save, so other modules like Role Change Notify cannot interoperate with it (see #341126: Does not work with Role Delegation). user_save() is the preferred way to operate.

The attached patch updates role_delegation to use user_save().

#1

nathan573 - December 4, 2008 - 21:37

Is this patch available, or is it under review? There is no attached file.

#2

rfay - December 4, 2008 - 21:46

Interesting... I attached it to the issue and it doesn't show. Here it is.

AttachmentSize
role_delegation_user_save_patch_drupal5.patch 1.07 KB

#3

marcp - December 7, 2008 - 15:10

I haven't tested the patch yet, but agree that this is the correct way to save roles. It's how Userplus does things now when assigning roles after having a similar issue raised.

#4

nathan573 - December 11, 2008 - 22:21

I applied this patch on a production site and it seems to work properly.

#5

iamwhoiam - February 26, 2009 - 12:36
Status:needs review» reviewed & tested by the community

Definitely works. Please commit?

#6

David Lesieur - March 3, 2009 - 01:15
Version:5.x-1.1» 5.x-1.x-dev
Status:reviewed & tested by the community» fixed

Committed, thanks!

#7

System Message - March 17, 2009 - 01:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.