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