You are here

function privatemsg_user_login in Privatemsg 7

Same name and namespace in other branches
  1. 7.2 privatemsg.module \privatemsg_user_login()

Implements hook_user_login().

File

./privatemsg.module, line 1266
Allows users to send private messages to other users.

Code

function privatemsg_user_login(&$edit, $account) {
  if (variable_get('privatemsg_display_loginmessage', TRUE) && privatemsg_user_access()) {
    $count = privatemsg_unread_count();
    if ($count) {
      drupal_set_message(format_plural($count, 'You have <a href="@messages">1 unread message</a>.', 'You have <a href="@messages">@count unread messages</a>', array(
        '@messages' => url('messages'),
      )));
    }
  }
}