drupal - I'm trying to use a PHP code for panel visibility in a Panels3 based on Friendlist -
I am trying to gain a true value to get the visibility of the panel of heartbeat messages in a user I have space in a panel to display the list. The display works but I can not understand how to restrict access to the panel based on the user viewing the panel. The goal I want is to show the panel to some people only with friends and some roles. Whatever role I can play, but I do not have enough information about PHP to work on friendship level. I guess a bit like this:
The logged-in user is seen twice with the user on the basis of user ID logic.
I know that my example is not like the actual code, but as I said that I do not have much on here.
You should go to this.
Global $ user; $ Friend_list = get_friend_list ($ page_uid_argument); If (in_array ($ user- & gt; uid, $ friend_list)) {// show messages}
where get_friend_list ()
is a normal function that catches The user gives an array of UID based user relations, and the UID. I do not know if you are using codewise / module
Comments
Post a Comment