Closed (fixed)
Project:
RoleAssign
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2012 at 09:54 UTC
Updated:
17 Sep 2012 at 17:21 UTC
Using this module, the changes are not saved. For some reason when the form is submitted the roleassign.admin.inc file is not included so the hook_user_presave() is never called.
This can be fixed by adding the following to _roleassign_form_alter():
$form_state['build_info']['files']['roleassign'] = drupal_get_path('module', 'roleassign') . '/roleassign.admin.inc';
Comments
Comment #1
salvisSorry, this issue somehow slipped through the cracks.
What is the path (URL) where your changes are not saved?
Comment #2
salvisNo follow-up.
Comment #3
seanbI was able to reproduce this. The hook roleassign_user_presave() in roleassign.admin.inc is not called when saving a user.
Moving this function to the roleassign.module file works. You need to move the functions _roleassign_assignable_roles() and _roleassign_sticky_roles() as well.
I can't tell why the choice was made to add the hook_user_presave() in the admin.inc file, so maybe there is another fix for this issue that doesn't involve moving the functions.
Comment #4
salvisThanks. I've taken the easy way out and created a thunk in roleassign.module.
Pushed to the -dev version (give it up to 12h to be repackaged).
Please try it out and let us know how it works.
Comment #5
gaëlgIt works for me. For those who don't want to use the dev version: http://drupalcode.org/project/roleassign.git/commitdiff/0429689
Comment #6
salvisThank you for your feedback, GaëlG.