You are here

function role_expire_user_admin_role_submit in Role Expire 6

Same name and namespace in other branches
  1. 8 role_expire.module \role_expire_user_admin_role_submit()
  2. 7 role_expire.module \role_expire_user_admin_role_submit()
  3. 2.x role_expire.module \role_expire_user_admin_role_submit()
1 string reference to 'role_expire_user_admin_role_submit'
role_expire_form_user_admin_role_alter in ./role_expire.module
Implementation of hook_form_FORM-ID_alter().

File

./role_expire.module, line 226
Role Expire module

Code

function role_expire_user_admin_role_submit($form, &$form_state) {
  if ($form_state['values']['op'] == t('Delete role')) {
    role_expire_delete_default_duration($form_state['values']['rid']);
  }
  else {
    role_expire_set_default_duration($form_state['values']['rid'], $form_state['values']['role_expire']);
    drupal_set_message('Role expiry set.');
  }
}