Issue with Instructor Profile URL Parameter Causing Unexpected Redirection
-
Hi guys,
I’m facing an issue with the instructor profile URLs in Tutor LMS. The link to the instructor’s profile is generated as follows:
https://site.com.br/profile/professor?view=instructor
When a user is logged in, clicking on this link correctly takes them to the instructor’s profile page. However, when a user is not logged in, this link redirects to a random post instead of the instructor’s profile.
After some investigation, I found that the link is being generated by the function
tutor_utils()->profile_url
, which includes theview
parameter. When I remove the?view=instructor
parameter from the URL, the link works as expected for both logged-in and non-logged-in users.I’m suspecting that the issue lies in how the
view
parameter is being handled, possibly due to permission checks or redirection rules.My Questions:
- Is there a specific configuration to make this work correctly with the
view=instructor
parameter for non-logged-in users? - Where exactly is the
view
parameter used in the Tutor LMS logic? Are there any hooks or filters that I could use to modify the behavior without modifying the core plugin files? - How can I ensure that the instructor profile page works correctly for both logged-in and non-logged-in users, whether or not the parameter is present? Or how do I remove this parameter without changing the original function?
Any help would be greatly appreciated!
- Is there a specific configuration to make this work correctly with the
- You must be logged in to reply to this topic.