View Issue Details

IDProjectCategoryView StatusLast Update
0027836mantisbtplug-inspublic2022-02-26 05:52
Reporterfakir Assigned Todregad  
Status closedResolutionduplicate 
Product Version2.24.1 
Summary0027836: The EVENT_AUTH_USER_FLAGS event does not fire if the user does not exist in the DB

Hello. Sorry for my English.

I am trying to write a plugin for authorization through several LDAP servers. And now I ran into the indicated problem, due to which the auto-creation of the user through the plugin does not work.

As I understand it, the problem is in the code "core / authentication_api.php"

if (! $ p_user_id) {
# If user id is not provided and user is not authenticated return default flags.
# Otherwise, we can get into a loop as in # 22740
if (! auth_is_user_authenticated ()) {
return new AuthFlags ();

if the user is absent, the function is exited without reaching the EVENT_AUTH_USER_FLAGS event.

TagsNo tags attached.


duplicate of 0029517 resolvedcommunity Login redirection to plugin credentials page for non-existent user 




2021-01-05 04:25

developer   ~0064928




2022-01-28 17:00

developer   ~0066207

Even though this is the older issue, I'm closing it as duplicate of 0029517 since the latter is much better described including steps to reproduce.

Related Changesets

MantisBT: master 76f01f8d

2022-02-14 19:10


Committer: community

Details Diff
Auth plugin events not fired for non-existent users

Handle auth_flags edge cases which break certain authentication plugins
Fix login redirection for auth plugin.

Fixes 0027836, 0029517, PR
Affected Issues
0027836, 0029517
mod - core/authentication_api.php Diff File
mod - login_password_page.php Diff File