Good day, how I can create a Rule which show MESSAGE site, If current logged user have new unread message?

Comments

ptmkenny’s picture

Priority: Major » Normal
Status: Active » Fixed

If you need to check if a user has unread messages, you can add an Execute custom PHP code condition to your rule:

$account = user_load([site:current-user:uid]);
$unread_total = privatemsg_unread_count($account);
if ($unread_total > 0) {
  return TRUE;
}
else {
  return FALSE;
}
andreystrelkov’s picture

Wow, Cool! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.