function subuser_switch_user_operations_switch in Subuser 8
Same name and namespace in other branches
- 7.2 switch/subuser_switch.module \subuser_switch_user_operations_switch()
Callback for subuser switch user operation.
1 string reference to 'subuser_switch_user_operations_switch'
- subuser_switch_user_operations in switch/
subuser_switch.module - Implements hook_user_operations().
File
- switch/
subuser_switch.module, line 54 - Provides primary Drupal hook implementations.
Code
function subuser_switch_user_operations_switch(array $accounts) {
// Only process the first account since switching to multiple makes no sense.
if (($uid = current($accounts)) && ($account = user_load($uid)) && subuser_switch_user_access($account)) {
subuser_switch_user($account);
}
}