Hi,

I really like this module, but just realised that it doesn't seem possible to view other people's relationships. Furthermore the url "relationships/x" didn't work properly, since x was used both as RTID and as UID.

The fix was quite simple:
In user_relationships_hooks.inc I changed:
In lines 170,177,199: $access to $view_access (to grant access to view rather than admin only to those pages)
In line 140 $id to $user->uid (to fix behaviour of relationships/x)

If someone could confirm the problem (and fix), I'd be very grateful. A bit confused that I didn't find anything in the issue queue here, seeing that it seemed to me to be quite a major issue?

Anyway, thanks for a great module!

kmh

Comments

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

jasonflenniken’s picture

Status: Closed (fixed) » Active

I can confirm this.

There also appears to be some faulty logic in some of the default queries. I'm digging into that now.

alex.k’s picture

Assigned: karlmoritz » alex.k
Status: Active » Needs review
StatusFileSize
new959 bytes

Attached patch adds a new "view relationships of other users" permission to allow this. It also fixes what @jasonflenniken reported. Basically in URLs of the form "relationships/$rtid" $rtid was being used as user ID. Please test this fix, and post back with results. Thanks.

alex.k’s picture

StatusFileSize
new27.02 KB

It is worth mentioning this feature is probably not going to be in 6.x. There are theming issues: consider one-way relationships. When you look at someone else's profile and their relationships with other users, seeing "student (You to Them)" does not make much sense when neither "you" nor "them" is really you. To list other people's relationships is very easy in Views, so that is the preferred way.

lunarbear’s picture

Tried out the patch but theres an error in terminal: patch unexpectedly ends in middle of line.
I'm using 5.x-2.9 if that makes any difference?

Thanks for any insight, I'm keen to get this added functionality.

alex.k’s picture

Version: 5.x-2.8 » 5.x-2.9
StatusFileSize
new2.5 KB

Please see attached patch, updated against 2.9.

alex.k’s picture

alex.k’s picture

Status: Needs review » Closed (won't fix)

No interest in this patch from what I see.

Gabriel R.’s picture

Version: 5.x-2.9 » 6.x-1.x-dev
Status: Closed (won't fix) » Needs work

I would be very interested in this patch. I could help test and report bugs if it worked on the latest stable or dev.

berdir’s picture

Status: Needs work » Closed (duplicate)

This is not going to happen for 6.x-1.x. Instead, see #1115998: Revamp core and UI permissions for the issue going *is* going to be commited to 7.x-1.x.

Gabriel R.’s picture

Alex, you said: To list other people's relationships is very easy in Views, so that is the preferred way.

Would you care to explain how that could be done? I am struggling to #1139250: List any user's relationships myself.

Thanks.