Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensei's redirect after login breaks other functionality #7747

Open
ctdealba opened this issue Feb 11, 2025 · 0 comments
Open

Sensei's redirect after login breaks other functionality #7747

ctdealba opened this issue Feb 11, 2025 · 0 comments
Labels
[Status] Needs Triage Issue needs to be triaged [Type] Bug

Comments

@ctdealba
Copy link

Sharing the bug report identified by one of our Sensei Agency users:

Hi Sensei.

We're investigating an issue where several bits of functionality in other plugins no longer work with Sensei installed. We've tracked this down to a function called "teacher_login_redirect" in Sensei's "Sensei_Teacher" class.
In this function, a redirect is executed, followed by a call to "exit;". This function is attached to WordPress's "wp_login" hook with a priority of 10. Other functions attached to this hook are not executed because Sensei does a redirect+exit.

For example, we use a plugin to track the last time a user logs in. This uses the same hook, with the same priority (10 is very common, and the default value). This plugin no longer registers login events. Several other plugins have similar problems.

Would it be possible to use a higher priority number in Sensei, so other 3rd party code is more likely to be executed before the redirect happens? Or perhaps there's a more elegant solution?

I'd really appreciate it if you'd consider changing the priority in Sensei's code. It seems illogical to me to ask clients to fix this, forcing them to write custom plugins or edit theme files that get overwritten with updates. We are certainly able to, but that may not be the case with other customers.

Thank you.

@ctdealba ctdealba added [Status] Needs Triage Issue needs to be triaged [Type] Bug labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Triage Issue needs to be triaged [Type] Bug
Projects
None yet
Development

No branches or pull requests

1 participant