Closed (fixed)
Project:
Auto Assign Role
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
1 Mar 2008 at 14:38 UTC
Updated:
14 Aug 2008 at 03:43 UTC
Jump to comment: Most recent file
Hi
I would like to use this module on Drupal 6.x - what are Your plans for Drupal 6.x ?
Thanks
Bo
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | autoassignrole-dp6.zip | 10.04 KB | mariusooms |
| #16 | autoassignrole-d6.zip | 2.06 KB | Nick Urban |
| #11 | autoassignrole.zip | 2.01 KB | neruda001 |
| #8 | autoassignrole.d6_nu.patch | 15.21 KB | Nick Urban |
| #4 | autoassignrole-5.x-1.1-dev.patch | 12 KB | Nick Fedchik |
Comments
Comment #1
andypostCommutative patches against latest cvs-source.
- Included http://drupal.org/node/235707 patch about sorting.
- Code formatting and cleanup.
- Default values provided as defines.
Second patch for migration to 6.x
Waiting for reviews.
Comment #2
Nick Fedchik commentedI apply the autoassignrole5-dev.txt patch on "5.x-1.1" version (of course, rasping the patch, because of src code formatting differences).
Looks like the bug (Roles are not assigned after registration) has been fixed.
Waiting for new version.
Thanks for andypost.
Comment #3
mariusooms commentedHi...I tried to apply this patch, but it completely choked on it (It could well be me, I'm completely green at patching). What does rasping the batch mean? In the end I just went in and changed the code manually. I can also verify the auto assign now works!
Kind regards,
Marius
Comment #4
Nick Fedchik commentedThat's mean than I hack the patch file - cut off the unnecessary differences for .info and .install files
Here is my patch attached.
You can copy the patch file into the module directory, than apply as listed below:
$ patch -p0 < autoassignrole-5.x-1.1-dev.patchComment #5
mariusooms commentedThanks Nick...I'm learning as go. It makes sense now looking at the two different files.
Comment #6
meeotch commentedJust applied this patch against 5.x-1.1... unfortunately, the User-Selected roles are not being assigned on first login. I'm using logintoboggan, so I assume it's the same compatibility issue that's been around for a while. (Though I thought this cumulative patch was supposed to fix it.) Does anyone have further info on this problem, or an idea of how to track down why the initial login is not triggering role assignment?
EDIT: definitely a compatibility issue. When logintoboggan is disabled, roles get assigned correctly. It seems that this has been mentioned in several threads - some of which have been pointed at this thread as a fix, or marked "closed." Should I submit this as a new issue? (Doesn't feel like it belongs here, other than this is where the patch came from...)
Comment #7
nina_bee commentedThis is great! I'm new to drupal and I really needed this to work. Now I'ts perfect! Roles are assigned by the user himself. Beside I "patched" for the fiste time!!! Thanks a lot
*********^_^****
Bee
Comment #8
Nick Urban commentedHey Andy,
I improved your patched version to remove some errors that were appearing in the Drupal 6 version.
Applying this patch against HEAD produces (as far as I can tell) a fully functional D6 port.
There were two notable issues: The first is a small one, which is that you were using DEFINE'd #default_values for the '#type' => 'checkboxes' form elements, which didn't work, because default values for checkboxes has to be an array. This was causing errors until the module was configured. I replaced them with a default empty array (can't DEFINE to an array, apparently, or I would have done that).
Secondly, and more importantly, the roles set in hook_user were being cleared by user_save, which replaced them with the roles in the $edit['roles'] array. I changed the code so instead of inserting manually it just adds the roles (as keys, mind you, to keep with users_roles() format) to $edit['roles'] and now it seems to work fine. Another option would have been to unset $edit['roles'], but since the feature is already there, why not use it?
Nick
Comment #9
nina_bee commentedHi! Iv applied the autoassignrole-5.x-1.1-dev.patch patch and since then only users with admin access can access my forms (created with webform) I tried to desable and uninstal both modules and then reupload and reenable webform but the problem remains. Is there a way to fix my website? or shoul I restart from scratch?
Thanks
Bee
Comment #10
neruda001 commentedandypost thank you for your advice. It works great! I've used autoassignrole5-dev.txt to modify autoassignrole.module and autoassignrole.install and even if I had not unistalled and re-installed the module, it works only with modifications !
thanks a lot
Pablo
Comment #11
neruda001 commentedI'm posting the autoassignrole.module 5.x-1.1 patched as autoassignrole5-dev.txt file posted by andypost.
I apologize if I've used not right tag to classificate the file.
rename it to autoassignrole.module
and don't forget to modify autoassignrole.install file as described in autoassignrole5-dev.txt file, if you have to install it i suppose.
Pablo
Comment #12
giorgoskThis works but with logintoboggan enabled it does not
(as meeotch mentions)
Comment #13
giorgoskI think this title would be more informative
Comment #14
meeotch commented@GiorgosK (and everyone else) - Note that there's another issue that is already addressing the Autoassignrole / LoginToboggan incompatibility:
http://drupal.org/node/226765
Anyone who wants to chime in on that thread with ideas should definitely do that.
Comment #15
zmove commentedSubscribing for a drupal 6 version without applying patch
Comment #16
Nick Urban commentedFor zmove and whoever else:
If you want to use my modified Drupal 6 autoassignrole without patching, you can download it here.
(I also made a few formatting changes to adhere more to Drupal standards--hopefully no one will mind :)
Comment #17
scotese commentedThanks for creating this but when I load this I still get a message saying this is a 5.1 version and not compatible with drupal 6.
Comment #18
mariusooms commentedThe .info file and .install file are missing. I included them here for you, but they are not official. Maybe the maintainer can finalize this and get it branched to a 6 release.
Regards,
Marius
Comment #19
Lieb_ commentedthis last zip file works as far as i am able to tell thanks a million, none of the other modules are ported to 6 yet.
Comment #20
cyberswat commentedI rewrote the module and created a 6 dev release. Got rid of the memory intensive variables and used the new options in hook_user to do this module properly. Will not commit these changes but feel free to evaluate the new module.