Project:Apply for role
Version:6.x-1.9
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

It would be nice to have an option
where users are autoapproved as soon as they apply
or at least be approved when system (or admin)
approves them

Comments

#1

I think this module, Apply for Role, is specifically for managed approvals. There's another module called "auto assign role" which does what you suggest, and would suit your needs: http://drupal.org/project/autoassignrole "This module automatically assigns new users to a specific role when the user initially signs up for their account."

#2

Status:active» fixed

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#4

Version:5.x-1.x-dev»
Status:closed (fixed)» active

Hi, may I second this request for 6.x?

I want my users to start out as default, but be able to move up to higher roles if they want to. This will open up 'advanced' settings for them, I don't want this to be moderated but auto approved. Thanks!

#5

I would like an auto-approve option also.

#7

any news on this very useful feature? autoassign role doesn't help in some cases.

#8

It sounds like a useful action to have for a role application.

#9

Version:» 6.x-1.9

I'd like to request this feature as well

#10

me too, I need this feature. I tried Auto Assign Role module but it is not working prefectly.
I would like user to choose role during their account registration and depend on their role, they will allow to view certain Webpages and some webpages are disable for them.

I think it would be nice to have auto approve function in this module

#11

AutoAssignRole does not work like apply_for_role does, since it does not deal with already active users and only new ones.

I've been attempting to create an automatic approval via the hook_apply_for_role($action == 'apply') and then calling apply_for_role_approve_apply(), but because of the recursive nature of this and how the hooks are laid out, theres a final save function which eventually nullifies any roles, which get added.

I've managed to do it with a cron hook which isn't ideal, but works well enough for me.

<?php
function cwg_affiliate_cron() {
 
$result = db_query("SELECT * FROM {users_roles_apply} WHERE approve_date=0 AND approved=0");
  while(
$record = db_fetch_object($result)) {
   
$account = user_load($record->uid);
   
apply_for_role_approve_apply($account, $record->rid);
  }
}
?>

If you only wanted to do it for certain roles, you could add another WHERE over the `rid` field.

#12

You could also use a Hook user insert for D7

<?php
/**
* Implementation of hook_user_insert() for automatically approving applications
*/
function modulename_user_insert(&$edit, $account, $category) {
       
// I manually set my $rid to 8, so you'll need to change that
   
apply_for_role_approve_apply($account, 8);
}
?>
nobody click here