• Resolved pikemurdy

    (@pikemurdy)


    We have a WordPress multi-site set up to use subdirectories (rather than sub-domains).

    It is currently running:
    WordPress Version 5.7
    Authorizer Version 3.0.7
    PHP Version 7.4

    The behavior is this: If you create a user by entering an email address through Authorizer (/wp-admin/admin.php?page=authorizer). The user appears immediatly in the list, but then disappears. There is no ‘WordPress user’ created for email address either. Also, if you create a wordpress user through wordpress (/wp-admin/user-new.php), that user does not appear in the Authorizer list.

    A few weeks ago everything seemed normal. I am not sure what could have changed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paul Ryan

    (@figureone)

    We haven’t been able to reproduce this running those versions. FYI, Authorizer does not create the actual WP_User (in the wp_users table) until that user successfully authenticates.

    But this sounds like the AJAX handler for adding the user in Authorizer is failing for some reason. Can you open up the browser inspector after “user appears immediatly in the list, but then disappears” and see if there are any errors reported?

    Thread Starter pikemurdy

    (@pikemurdy)

    In the past we have created WP_Users and they automatically appear in the authorizer list. That doesn’t seem to be happening now.

    However, we just went through the reverse process and added a user via Authorizer. (and the users are not disappearing, perhaps there was some JS not loading properly yesterday although it happened on two different installations and three different computers testing it).

    Indeed, adding a user with Authorizer and having that user log in, created the WP_User.

    What is the preferred method of creating users while using your plugin?

    Plugin Author Paul Ryan

    (@figureone)

    What is the preferred method of creating users while using your plugin?

    There is no one preferred method, it’s intended to be flexible. When you activate the plugin, it adds all existing users to the approved list. When you create new users via the WordPress UI, it syncs those users to the approved list. When a new user successfully authenticates via one of your external services, it will either (1) add that user to the approved list (if “Login Access > Who can log into the site?” is set to “All authenticated users”), or (2) add that user to the pending list (if “Login Access > Who can log into the site?” is set to “Only approved users”).

    In the past we have created WP_Users and they automatically appear in the authorizer list. That doesn’t seem to be happening now.

    We just tested this on multisite (Add New User, with “Add the user without sending an email that requires their confirmation” both on and off), and each successfully created an entry in the Authorizer approved list. Are you perhaps creating new users using another plugin? If so, it’s possible that plugin is avoiding the normal hooks that fire when a new user is creating using WordPress core.

    For reference, Authorizer hooks into those actions here:
    https://github.com/uhm-coe/authorizer/blob/63802f4b177a7fd3429dfa12fce3a47bc47f8044/src/authorizer/class-wp-plugin-authorizer.php#L160-L168

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Authorizer Not Creating Users’ is closed to new replies.