You are here

function apply_for_role_approve_form in Apply for role 5

Same name and namespace in other branches
  1. 6 apply_for_role.admin.inc \apply_for_role_approve_form()
  2. 7.2 apply_for_role.admin.inc \apply_for_role_approve_form()
  3. 7 apply_for_role.admin.inc \apply_for_role_approve_form()
1 string reference to 'apply_for_role_approve_form'
apply_for_role_menu in ./apply_for_role.module
Implementation of hook_menu().

File

./apply_for_role.module, line 242
Allows users to apply for roles.

Code

function apply_for_role_approve_form($uid, $rid) {
  $user = user_load(array(
    'uid' => $uid,
  ));
  $form['user'] = array(
    '#type' => 'value',
    '#value' => $user,
  );
  $form['rid'] = array(
    '#type' => 'value',
    '#value' => $rid,
  );
  $roles = user_roles(TRUE);
  return confirm_form($form, t('Do you want to approve the application from user %username for role %role', array(
    '%username' => $user->name,
    '%role' => $roles[$rid],
  )), 'admin/user/apply_for_role', t('The role will be automatically assigned to the user.'), t('Approve'));
}