function masquerade_block_1_submit in Masquerade 7
Same name and namespace in other branches
- 5 masquerade.module \masquerade_block_1_submit()
- 6 masquerade.module \masquerade_block_1_submit()
Masquerade block form submission.
File
- ./
masquerade.module, line 704 - The masquerade module allows administrators to masquerade as other user.
Code
function masquerade_block_1_submit($form, &$form_state) {
//unset($form);
$masq_user = _masquerade_user_load($form_state['values']['masquerade_user_field']);
if (!masquerade_switch_user($masq_user->uid)) {
drupal_access_denied();
}
else {
drupal_goto($_SERVER['HTTP_REFERER']);
}
}