function privatemsg_user_login

7-1 privatemsg.module privatemsg_user_login(&$edit, $account)
7-2 privatemsg.module privatemsg_user_login(&$edit, $account)

Implements hook_user_login().

File

./privatemsg.module, line 1271
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'))));
    }
  }
}