function drupalchat_user_login in DrupalChat 8
Same name and namespace in other branches
- 7.2 drupalchat.module \drupalchat_user_login()
- 7 drupalchat.module \drupalchat_user_login()
Implements hook_user_login().
File
- ./
drupalchat.module, line 308 - Module code for DrupalChat.
Code
function drupalchat_user_login($account) {
setcookie("DRUPALCHAT_NEWLOGIN", 1, time() + 120, '/');
if (\Drupal::config('drupalchat.settings')
->get('drupalchat_polling_method') == DRUPALCHAT_COMMERCIAL) {
setcookie("iflychat_key", "", time() - 3600, "/");
setcookie("iflychat_css", "", time() - 3600, "/");
setcookie("iflychat_time", "", time() - 3600, "/");
}
// TODO Please review the conversion of this statement to the D7 database API syntax.
/* db_query('DELETE FROM {drupalchat_msg} WHERE uid1 = uid2 AND uid1 = %d', $account->uid) */
// db_delete('drupalchat_msg')
// ->where('uid1 = uid2')
// ->condition('uid1', $account->uid)
// ->execute();
}