Hello,
I have a problem to use (integrate) this module with a custom module wich checks the relation (user relationships module) between two users . Here is my user_is_friend.module
<?php
function user_is_friend_init(){
global $user;
global $user_is_friend;
if (arg(0) == 'user' && is_numeric(arg(1))) {
$profile_uid = arg(1);
if (in_array('administrator', $user->roles))
{
$user_is_friend = 1;
}
elseif ($user->uid == $profile_uid) {
$user_is_friend = 1;
}
else {
$user_is_friend = user_relationships_load(array('between' => array($user->uid, $profile_uid), 'approved' => TRUE)) ? 1 : 0;
}}}
Now I will create a reaktion on this with your module and addet this to the "variable match" field
user_is_friend|1
but this does not work. Did you have any Idea what Iam doing wrong?
Thanks for any help!
Best regards
Frank
Comments
Comment #1
btopro commentedcontext_var module only works with variables living in the Drupal variables table in the database. I think what your looking for might be https://drupal.org/project/context_entity_field
Comment #2
fraweg commentedOk,
thanks for your fast suppert..
Best regards
Frank