WordPress.org

Forums

WP-Members
[resolved] Validating extra fields in WP-Member form (5 posts)

  1. wmelton
    Member
    Posted 4 years ago #

    Hi guys,

    Very impressed with this plugin and have got it to do alot of things I have need it to do with my web site. But ...

    The default wp-member form has username and password input boxes, which is ok for many member sites. But, I need an extra input box and a extra hidden field. I have added a new input box called ID and a extra hidden variable. I have also added fields to the user table to hold this extra data.

    Q: How do I get wp-member to authenticate the user by checking them against the ID, username, password and user type. Yes, I realise its a hack and that the plugin won't be updatable.

    Your help is appreciated.

  2. Chad Butler
    Member
    Plugin Author

    Posted 4 years ago #

    Well, it would be possible to do what you are describing, but it would not be a simple process. In order for the plugin it continue to work within the WP contruct, you'd need to consider that it would still need to be able to function with wp_login/wp_signon, as it relies on those to be able to use other native functions such as is_user_logged_in. Also, you'd have to consider your additional fields carefully - WP already has a user field ID as well as a user type/role/level (WP-Members assigns users to the default role established in your settings, usually this is "subscriber").

  3. wmelton
    Member
    Posted 4 years ago #

    Thanks cbutlerjr,

    I have had a good look through the wp-members code and it would involve alot of hacking. So, I guess I need to come at my problem from a different angle. Instead of the extra ID input box. I will have to get the users to append their ID to the end of their user name. I'm guessing the typeOfUser hidden variable can set a global variable which I can use when the user is logged in along with their normal wp role.

    Crunch: I need the contributors to be able to new accounts for subscribers, but only to their own particular group of subscribers.

    What do you think?

  4. Chad Butler
    Member
    Plugin Author

    Posted 4 years ago #

    That second piece would take some significant work on the admin side. I'm not totally sure how I would approach it, but just thinking off the top of my head, here are some ideas...

    You would need to make sure contributors did not have standard access to user data. Depending on their assigned role, you might consider some type of role manager plugin to manage that.

    Then, I would probably build out a specific set of admin panels for managing subscribers based on the contributor.

    That's not a small task, but I'm not aware of any specific plugins/hacks that handle what you described directly. There are a lot of admin hooks that you can use within WP, but on the admin side, a lot of these are inadequately documented (if they are at all), so it sometimes takes a lot of trial and error.

    Hope that helps.

  5. wmelton
    Member
    Posted 4 years ago #

    Okay, I'm going to work round this as I have done on my current no WP site and provide the contributors with pages with custom admin functionality and display content specific to the role.

    Thanks for your thoughts.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags