function drupalchat_user_entry_form_submit in DrupalChat 6.2
Same name and namespace in other branches
- 7.2 drupalchat.module \drupalchat_user_entry_form_submit()
- 7 drupalchat.module \drupalchat_user_entry_form_submit()
File
- ./
drupalchat.module, line 908 - Module code for DrupalChat.
Code
function drupalchat_user_entry_form_submit($form, &$form_state) {
if (user_access('access drupalchat all logs')) {
$account = user_load(array(
'name' => check_plain($form_state['values']['name']),
));
$_SESSION['drupalchat_switch_user'] = $account->uid;
drupal_goto('drupalchat/messages');
}
else {
drupal_access_denied();
}
}