Hi,
Thanks for the module.
Currently I'm using the Views_bookmark, in order to dismiss messages per user.
Will your module support Per User message?

Cheers,
Amitai

Comments

anders.fajerson’s picture

You mean a message only to a specific user? I would guess that privatemsg is better for that sort of thing. But the PHP visibility option included in this module is quite flexible. To show a message only to a user with uid 35 you can put this in the form (not tested):

global $user;
return $user->uid == 35;
anders.fajerson’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
pjek’s picture

as a drupal newbie and a PHP uninitiated would

global $user;
return $user->role == anonymous;

show the message only to anonymous users?

pjek’s picture

I already found the answer in the snippets

global $user;
if (in_array('anonymous',$user->roles)) {
  return TRUE;
} else {
  return FALSE;
}

does it!! Actually you can replace anonymous with any other role.