Links on user menu all direct to current user

5.52K viewsIssues
1

The menu bar on the user pages is not behaving like it used to. I’m not sure if it’s related to the recent update or not.

When I’m signed in, any link I click in another user’s profile is directed to my page. For example, if I’m signed in as User1 and I visit User2’s profile, any link I click on User2’s profile will send me to my User1 profile.

If a user is not logged in, any link clicked on a user’s page adds #AnonymousUser to the url and the link does not work.

I did not change any AnsPress settings, so I’m not sure why it’s behaving like this now. Any help is appreciated, thanks!

Yes its a bug, I am fixing it right now.

1

This issue has been fixed and commit has been made to GitHub.

Also releasing a new version in WP repository.

I copied the user.php file from Github and got an error:
Fatal error: Call to undefined function ap_user_can_upload_avatar() in ~/public_html/wp-content/plugins/anspress-question-answer/includes/user.php on line 469

However, the download from WP worked for me. Thanks, Rahul! 🙂

Edit: In an older version some menu links like “profile” were hidden unless you were that logged in user. Right now all the links are showing, so when you click “profile” or “subscription” for another user, you get a 404 error. I’ll just revert my user.php to an older version.