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
Comment #1
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #2
jasonflenniken commentedI can confirm this.
There also appears to be some faulty logic in some of the default queries. I'm digging into that now.
Comment #3
alex.k commentedAttached 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.
Comment #4
alex.k commentedIt 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.
Comment #5
lunarbear commentedTried 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.
Comment #6
alex.k commentedPlease see attached patch, updated against 2.9.
Comment #7
alex.k commentedA similar issue for 6.x is #481874: Can't view relationships unless permission is set to 'administer users'
Comment #8
alex.k commentedNo interest in this patch from what I see.
Comment #9
Gabriel R. commentedI would be very interested in this patch. I could help test and report bugs if it worked on the latest stable or dev.
Comment #10
berdirThis 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.
Comment #11
Gabriel R. commentedAlex, you said:
Would you care to explain how that could be done? I am struggling to #1139250: List any user's relationships myself.
Thanks.