function masquerade_block_1_submit in Masquerade 6
Same name and namespace in other branches
- 5 masquerade.module \masquerade_block_1_submit()
- 7 masquerade.module \masquerade_block_1_submit()
Masquerade block form submission.
File
- ./
masquerade.module, line 564 - masquerade.module
Code
function masquerade_block_1_submit($form, &$form_state) {
unset($form);
$masq_user = user_load(array(
'name' => $form_state['values']['masquerade_user_field'],
));
if (!masquerade_switch_user($masq_user->uid)) {
drupal_access_denied();
}
else {
drupal_goto(referer_uri());
}
}