WordPress.org

Ready to get started?Download WordPress

Forums

Members
[closed] wp-members and custom user roles: doable? (5 posts)

  1. spectrus
    Member
    Posted 2 years ago #

    Hi,

    I have an existing site with WP-Members integrated, and there was a feature requested to have a custom user role. I can create a new role using Capability Manager (or similar). Here's the challenge:

    1. Is it possible to implement a separate sign-up form for this new role? With additional fields, that is.

    2. Are there hooks within WP-Members that would allow me to automatically assign this new user role to all new subscriptions done through this separate form in #1?

    Any tips/pointers greatly appreciated! Thank you.

    http://wordpress.org/extend/plugins/wp-members/

  2. spectrus
    Member
    Posted 2 years ago #

    Come to think of it, I could probably get away with a single registration form. Having a "Are you an agent?" check-mark clicking on which would reveal all the extra (and optional) fields, as well as handling validation with JavaScript would probably do it.

    My second question is still up in the air, however.

  3. Chad Butler
    Member
    Posted 2 years ago #

    Yes, there is a hook you could probably use for the role. The wpmem_post_register_data action hook comes at the end of the registration process. At that point, the user data is inserted, including the role. The action hook has the registration fields available as an array passed through the hook (you could use $fields as a parameter in your function). The ID would be one of those, at which point you could update the user's role (if necessary) and then return.

  4. MarinaNitzak
    Member
    Posted 2 years ago #

    Hi there, I´m looking for someone to build me a website with this plugin. The website is for an online course - site itself basic enough, just one course content page to be protected by Username/Password access restriction. Can anyone recommend someone reasonably priced please? Thanks!!

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Please try http://codepoet.com/ or http://jobs.wordpress.net/
    Topic now closed as per the Forum Rules

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags