function drupalchat_ex_auth in DrupalChat 6.2
Same name and namespace in other branches
- 7.2 drupalchat.module \drupalchat_ex_auth()
- 7 drupalchat.module \drupalchat_ex_auth()
1 string reference to 'drupalchat_ex_auth'
- drupalchat_menu in ./
drupalchat.module - Implementaiton of hook_menu()
File
- ./
drupalchat.module, line 1087 - Module code for DrupalChat.
Code
function drupalchat_ex_auth() {
global $user;
// $user_name = NULL;
// $json = NULL;
// if(!$user->uid) {
// $sid = _drupalchat_get_sid();
// if(!(!$sid || $sid == -1)) {
// $user_name = drupalchat_get_current_guest_name();
// //$user_name = db_result(db_query('SELECT name FROM {drupalchat_users} WHERE uid = %d AND session = \'%s\'', $user->uid, $sid));
// }
// }
// else {
// $user_name = _drupalchat_get_username($user->uid);
// }
$user_name = _drupalchat_get_username($user->uid);
if ($user->uid && $user_name) {
$json = (array) _drupalchat_get_auth($user_name, array());
// $_SESSION['token'] = $json['key'];
}
drupal_json($json);
}