Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.