Forum Replies Created

Viewing 15 replies - 496 through 510 (of 574 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @rjjacob,

    Won’t be able to check until tomorrow as at a family event. This is a good excuse to escape for 5mins 🙂

    I could see the db change on my end this morning, however I hadn’t tried logging in with the e-mail (I always use the username) to make sure that logging in with email would work.

    The only other thing I would ask you to do when testing this is to turn off the setting that falls back to the WP database for logging in if the external database isn’t available. On the off chance the external db connection failed on the test it would hide the issue and keep the current user details.

    I will test this again tomorrow to confirm we’re getting different results but if you can check the above in the mean time that’d be great.

    Regarding the username. If your client is happy that sounds great. If not, get back in contact and I can add it to the backlog but I’ve got a handful of other feature requests to cater for first.

    In the meantime, let’s definitely fix this email updating issue 🙂

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @rjjacob,

    When an e-mail address is changed in the external DB, it will be updated in WordPress the next time the user logs in. I’ve just double checked this on my local install but if you’re not experiencing this please let me know.

    Regarding username – this gets a lot more complicated as this is the users unique identifier. Because of this I know one company that will not allow this default in the admin areas but will manually make the change on the database in extenuating circumstances.

    The reason this gets tricky is because when logging in, the external database is queried to find the username and then checks the password to authenticate. This username is what ties the external database to the WordPress one. In WordPress, (like a lot of user systems), the username can not be changed by default in the admin area however their display name can be modified.

    If you did want this functionality there is a fair bit or work involved as the only way I can currently think of to solve this would be to:
    1) Add another setting to the settings page to use another field from the external DB as the unique identifier. Hopefully it has a userID field or something similar in the users table.

    2) Have additional checks at login that if this functionality is chosen, it checks all users meta data for this value to see if the userID is already used.

    3) Check to see if the username they are trying to change to is already in use as this will also have to be unique for WordPress to function correctly (would need to double check this).

    4) If write some custom code to modify the user (including their username). Then allow WordPress to continue with its normal login process.

    This is a relatively big feature. I welcome your thoughts incase you think I’ve missed anything?

    Plugin Author tbenyon

    (@tbenyon)

    😀

    No worries. I’ll mark this as resolved for now but if you have any further issues just let me know.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @rjjacob,

    You’ve posted two error messages. The second error log that states a URL for the plugin is a mistake of mine. It was a debugging log I had forgotten to remove but there is no error happening here. I’ve removed it from the repo so it will not appear in the next version. Thanks for flagging 🙂

    Before seeing this, I would have assumed that the error before was related to the plugin however at the moment I don’t believe it is. If it is I will of course continue to look into this. Can we confirm whether this is the case?

    Can you tell me:

      The action you have to do to make the error happen? Is it on any page load?
      Whether this error log persists when External Login is disabled?

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @rjjacob,

    Looking into this now.

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey John,

    Just acknowledging this feature request.

    I’ve got a few features already requested that I’m working on but I’ve added it to the backlog for the plugin.

    Feel free to check back in at a later date to check on the progress.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey Jonathan,

    Really glad that the plugin is working so well for you and I’m very grateful that you took the time to write a review!

    Good luck with the site!

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey Jonathan,

    Creating a user is essential for the way that WordPress works. It’s going to mean that you can use other plugins as they’ll understand that the person logged in is a user and be able to do other things.

    If you want to block the user from accessing the admin area, that would be the thing to do.

    One few ways to do that is explained here:
    https://premium.wpmudev.org/blog/limit-access-to-your-wordpress-dashboard/

    These plugins may help:
    https://wordpress.org/plugins/wp-hide-dashboard/
    https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/

    Or with code you could add this code to your functions.php file

    add_action( ‘init’, ‘exlog_eg_blockusers_init’ );
    
    function exlog_eg_blockusers_init() {
        if ( is_admin() && ! current_user_can( ‘administrator’ ) && !( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
            wp_redirect( home_url() );
            exit;
        }
    }

    I’ll mark this as resolved but if you have any more questions let me know,

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @rushwhq,

    Brilliant! Really glad that you got it working! I’d be SOOOOO grateful if you you write a review:
    https://wordpress.org/support/plugin/external-login/reviews/#new-post

    I would happily give you out my details to help you but I’ve been warned by the moderators for this before as I’m not allowed to give out my details even though some people have found me on Facebook or LinkedIn before.

    To help you with your problem here let me mention a couple of points:
    User Access
    Being able to see other users details is dependent on their “Role”. If you’re an ‘admin’ role, by default, you’ll be able to access everyones roles. A ‘subscriber’ will not be able to.

    Redirection After Login
    If you want to redirect the user to a different page after they have logged in you can do this but because this is custom and outside of the scope of the plugin this is something you will manage yourself (or I’m sure there’s a plugin to do it).

    In your functions.php file you can add the following code and it will redirect the user to the home page once they log in.

    
    function exlog_login_redirect() {
        return '/';
    }
    
    add_filter('login_redirect', 'exlog_login_redirect');
    

    If you wanted the dinosaurs page you just have something like this:

    
    function exlog_login_redirect() {
        return '/dinosaurs';
    }
    
    add_filter('login_redirect', 'exlog_login_redirect');
    

    Let me know if you have any more questions.

    Again, a review would be really appreciated 🙂

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @anemos2k,

    No problem at all and thanks for your understanding.

    Just let me know a few days before if you get close to needing it and I’ll throw that functionality in for you.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @rushwhq,

    I’m sure we can find the answer together. Thanks for the screenshot as it clearly seems that the connection to the database is fine.

    Can you go through these steps and tell me where you get stuck and then we can try some more steps until we find the issue.

    1) Can you make doubly sure you’ve got a username and password that are working with the other system that uses the external database. I know this is obvious but I’ve made this cock up many times before. Double check.

    2) With the password from the account that you know works, go to a website such as the one below and type in your password. Make sure that the result is exactly the same as what is in the password field on the external database for that user.
    https://www.md5hashgenerator.com/

    3) If you don’t see any issues, could you please screenshot your settings page for me so I can have a look? If this is the case we’ll try some more things.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @volt74,

    Just wanted to say I haven’t forgotten about your suggestion.

    I’ve had another thread here where I discuss a solution that also meets your needs. Still working on it but just wanted to update and say thanks again for reaching out.

    Other thread:
    https://wordpress.org/support/topic/active-inactive-users/

    Will update you when I’ve got a working prototype incase it is of any use to you 🙂

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @windly,

    Haven’t heard back from you so I’m presuming you’ve got this in hand.

    If you need any advice or have any further questions get back to me but for now I’ll mark this as resolved.

    Thanks,

    Tom 🙂

    Plugin Author tbenyon

    (@tbenyon)

    Hey @anemos2k,

    Family life has got in the way. So just wanted to apologise and give an update at least.

    The functionality to exclude when logging in was very easy and I implemented that very quickly . . . however, trying to get a generic repeater field system for my front end that I can re-use is a bit of a bigger job but I’m making progress.

    If you have a deadline I could write you something that would allow you to add some code to your functions.php file or wp-config.php that would allow you to add this functionality that way, Might be a fix at least until I can finish making it more user friendly in the admin area form.

    If you’ve got a deadline and this would help let me know. If not I’ll plod on for now.

    Thanks,

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey Kyle,

    Sorry for the delay.

    My first thought is, have you searched for User Migration plugins? I haven’t but there may already be something out there that does exactly what you want.

    If not . . .

    You’re right that the users are getting converted to the WordPress users after they login.

    I don’t know where you’re current DB is but you could leave it where it is, or move it to the same place as the WordPress DB one so you don’t have to have two servers running. You may already have it on the same server?

    This way I guess using the plugin would mostly do what you’re looking for as it stands.

    The plugin I’ve written was based on the external system and database being the master record and handling the resetting of passwords and creating accounts.

    The benefits of what’s already in my plugin:
    – A new user would get created from the old system at first login
    – This user would have a new safer password hash created

    The issues to solve would be:

    1) We would have to reserve any usernames already used in the external database to ensure that a new user doesn’t take it before an old user has been migrated

    2) We would need to make the new DB be the preference so if a user already exists with that username we log them in, with WP. If not we check the external DB and see if they exist there and create them.

    3) I’ve had someone before who had a very custom hashing method like yours and I suggested I didn’t want to add it to the plugin as it was going to bloat it with a custom solution that no one else would use. I’ve now had a thought seeing yours that I could allow users to create a function (with a name I define in the instructions) that would exist in your functions.php file that would take in the password and salt and you could put the code you’ve specified above in it for your custom case.

    Does this all make sense? Do you have any thoughts? Have I missed anything?

Viewing 15 replies - 496 through 510 (of 574 total)