Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter mrn55

    (@mrn55)

    Hey Paul,

    So we’ve been trying to sort our issue with the roles changing. I think we are close, while I’m not sure it’s Authorizer, I still would like to ping you on slack and maybe get your feedback.

    Neal

    Thread Starter mrn55

    (@mrn55)

    Hey @figureone

    So we did some digging. See if any of this makes sense 🙂

    When a new user is added they are Subscriber. Another user, say a blog admin, goes in the Users section and changes their role to Editor. It seems Authorizer don’t care. When the user logs in, they are reset back to what ever role was set in Authorizer. This can apply to demoting a user from say Editor to Subscriber as well.

    Thoughts?

    Neal

    Thread Starter mrn55

    (@mrn55)

    Roger, I use Authorizer on a multisite with many themes, implementing that at the theme level is not sensible for our use case. However I can see not adding it to your plugin, while I think it should be an option, I may explore just creating a small mu plugin for it, if there you think that’s my best route.

    I did see you picked up the logout issue… sounds good.

    Thanks!

    Thread Starter mrn55

    (@mrn55)

    Also, may need to check this issue separately, logout functionality is not working, once logged into the system, I cannot log out. I’m reporting this early with little testing, if something changes will update.

    Thread Starter mrn55

    (@mrn55)

    Right on this sounds cool!

    Thread Starter mrn55

    (@mrn55)

    Any thoughts on this?

    Thread Starter mrn55

    (@mrn55)

    Hey Paul,

    So to get that user I ended up going near that line you mentioned and did:

    
                            if ( array_key_exists( 'uid', $user_data ) ) {
                                $username = $user_data['uid'];
                            } else if ( array_key_exists( 'username', $user_data ) ) {
                                $username = $user_data['username'];
    

    While that got me somewhere, Authorizer still tries to use the email to log users in, with the old CAS solution we had, it used the username. So I also changed:

    
    $user = get_user_by( 'email', $this->lowercase( $externally_authenticated_email ) );
    

    to:

    
    $user = get_user_by( 'login', $result['username']);
    

    Remember this is a CAS only authenticated blog, and it now seems to work, as all over 9000 users were put into this blog via CAS authentication, and all have logins by username. So it “works” now, but obviously it can break when the plugin is updated. You have any thoughts or ideas on what I should do from here? How can my case be satisfied by the plugin so I’m not needing to run some sort of hacky patch along side your plugin?

    Thanks,
    Neal

Viewing 7 replies - 1 through 7 (of 7 total)