Closed (fixed)
Project:
Auto Assign Role
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Jan 2010 at 05:37 UTC
Updated:
22 Sep 2010 at 15:40 UTC
Jump to comment: Most recent file
I finally got back to working on #431454: Integrate with autoassignrole module, but found autoassignrole_get_roles() to be broken (it spits out query errors and such), and not sure how its useful for the integration.
What I need is a function that gives me the current role the user will be given based on the current state of things.
As in if they are on a path based assignment and I call autoassignrole_get_role() then it would decode that and give me the role they we be getting, vs is they happen to be selecting it etc.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | autoassignrole-688934.patch | 7.32 KB | cyberswat |
Comments
Comment #1
cyberswat commentedComment #2
cyberswat commentedI added a new $op to autoassignrole_get_role() called 'active' which I think will do what your looking for. I also broke each of the functions in autoassignrole_get_role() out to their own functions. After applying the patch against dev, you can either call autoassignrole_get_role('active') or autoassignrole_get_active_path_roles() and it should give you what your looking for. You can pass an array of paths to either of these functions to get the roles that would be assigned for those path(s) while not passing an array should return them based on the current active path.
Let me know if this gives you what your looking for.
Comment #3
cyberswat commentedI'm going to switch status on this to see if the automated testing will kick in
Comment #4
cyberswat commentedComment #5
boombatower commentedJust making a comment will trigger it to evaluate the patches.
Comment #6
kewlguy commented#2: autoassignrole-688934.patch queued for re-testing.
Comment #7
cyberswat commentedhttp://drupal.org/cvs?commit=417894