WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: External DB authentication] Want to create users with different permission levels? (6 posts)

  1. charlener
    Member
    Posted 5 years ago #

    Got an email from someone asking about this - namely, using a third database/table/field that contains information about permissions for the accounts in question.

    In theory, this is a non-trivial addition, except for the complete lack of standardization of how to actually determine the permission levels. Right all user accounts are created with the same level of permissions as set in WP config section.

    Is this a feature that others would use? Is it necessary? Based on feedback, I'll work on adding it or not, as I personally don't use this.

  2. Lari
    Member
    Posted 5 years ago #

    For me, it would suffice to set permissions based on the permissions of the external table. In my external users table there is a field that contains a role id. If I could restrict access to WordPress to ids above some value or to a specific value, that would be sweet.

    Right now I can’t use the plugin because I don’t want to give access to all the users in the external database.

    I think this would be simpler than using a third table.

  3. charlener
    Member
    Posted 5 years ago #

    Hmm. Are these role ids typically in some sort of numeric range, or only numeric? This doesn't sound hard to add, though you'd still have to go that extra step of setting up in WP what local WP role will assign for new accounts.

    Think it's doable with more info on what typical data type is used for role ids.

  4. Lari
    Member
    Posted 5 years ago #

    In Activecollab there’s one table with the roles that have an id and another table with users. In the users table there’s a field role_id, which tells what role the user has. So the role ids come from the roles table. 1 to 7, currently.

    If I could tell your plugin the name of the field and a value that is required to add the user to WordPress, that would be great.

  5. charlener
    Member
    Posted 5 years ago #

    Alrighty,

    Added into version 3.1. Give it a shot and let me know what you think.

    I just noticed WP-MU got the 2.7 release - I'll try the new plugin code with it too and see if it works for everyone...

  6. Lari
    Member
    Posted 5 years ago #

    Worked at least with the test user, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic