Project:RoleAssign
Version:6.x-1.0-beta2
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Hi there,

Is there any way of get a role ticked by default in the admin/user/user/create page?

Thanks

Comments

#1

Logintoboggan might do that. Or there might be another module that does this?
Just googled and found this: http://drupal.org/project/user_autorole
There's only a D5 version for now. This is relevant too: #480232: Merging module user_autorole. And therefore I would suggest this feature is out of the scope of roleassign.

Alternatively, it's just a hook_form_alter job in a custom module :)

#2

In my humble opinion, having this feature here is actually better from a user-experience perspective, as the user can see that a role has been checked by default, and saves them from having to do it if it is the role that is usually assigned. And making it happen in the module is actually pretty straight-forward, as per the attached patch. Would be nice to see this in the final version of the module.

Note the patch is against beta-3.

Shawn

AttachmentSize
roleassign_6.x-1.0-beta3_cbd-2011-01-22.patch 1.42 KB

#3

Does this patch apply to user creation only or does it apply to editing, too? This could be a nasty source of confusion.

I see how having default roles checked when a user is created could be useful, but when a user is edited, then we must see what roles are actually assigned, without any futzing!

Having different behavior on the same page is not ideal, either, so I'm not sure this is a good idea even if editing is correct.

#4

It's just on creation. The logic checks to see if the $user->uid is zero, and if so, applies the defaults. Otherwise, it's an existing user that is being edited, so no defaults applied.

Shawn

#5

Category:support request» feature request
Status:active» closed (won't fix)

Having received maintainership of this module, I now deny this support-request-turned-into-feature-request.

I completely agree with joachim in #1.

The name of this module may have lead you to think that it would be the right module for the functionality that you'd like to have, but this is a misunderstanding. RoleAssign is about managing the permission to assign roles, not about assigning roles automatically at user-creation time.

nobody click here