Follow or unfollow, that is the question!

^[GS]^

Member
Hello!

As I can tell if a user can follow or unfollowing, from the template?

Code:
<xen:follow user="$user" class="Tooltip" />
I try replacing this line to have more control of the operation... but I can not determine if you can follow and unfollow.

I know who follow with:
Code:
               <xen:if is="{$user.isFollowingVisitor}">
                    {xen:phrase user_is_following_you, 'user={$user.username}'}
                <xen:else />
                    {xen:phrase user_is_not_following_you, 'user={$user.username}'}
                </xen:if>

I've even managed to create links to a token to follow and unfollow.
Code:
               {xen:link 'members/follow', $user, '_xfToken={$visitor.csrf_token_page}'} {xen:phrase follow}
                {xen:link 'members/unfollow', $user, '_xfToken={$visitor.csrf_token_page}'} {xen:phrase unfollow}

However, I can not know which of the two to use!
I'm trying to use the "isFollowing" function but I can not discover how it is used.

Thanks!
 
I dont have this
{$user.isFollowingVisitor}
also.

It is just not there. Every profile page has "username is not following you".
(...)

I have played around with /ControllerPublic/Member.php

It seems to me that the array $user is overwritten from an addon, because some parts of $user are there, others not.
 
Last edited:
Top Bottom