PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

User registration via WordPress API on non-multisite

s2Member Plugin. A Membership plugin for WordPress®.

User registration via WordPress API on non-multisite

Postby durge » January 29th, 2012, 6:25 pm

I am using the s2member-pro plugin to subscribe users to my website as a paid service and I am also using a plugin called subscribe2 which sends out daily emails of all the new posts. In the subscribe2 plugin, they have an option to auto-subscribe new users which I have enabled; however, it is not auto-subscribing new users.

I spoke with the developer of the plugin and he said that he did a quick look through of the s2member code and he said that the 'user_register' hook is never fired when users are created via the plugin on non-multisite configurations of WordPress and the comments in the code says that you are considering alternative ways of registering users through the WordPress API.

Is there any fixes that you might be able to recommend that I can try out to get this working?

Thanks!
User avatar
durge
Registered User
Registered User
 
Posts: 10
Joined: December 13, 2011

Re: User registration via WordPress API on non-multisite

Postby Jason Caldwell » February 6th, 2012, 2:40 pm

Thanks for your inquiry.

Hmm, I'm not sure which comments they are referring to exactly. I can confirm though, s2Member does already make full use of the WordPress API for user registration, and the user_register Hook is what powers most of the s2Member registration process (i.e. this Hook is definitely fired each time a user/member/customer registers).

See file: /s2member/includes/classes/registrations.inc.php
Code: Select all
/**
                * Configures all new Users.
                *
                * The Hook `user_register` is also fired by calling:
                * ``c_ws_plugin__s2member_registrations::ms_create_existing_user()`` and/or ``wpmu_create_user()``.
                *
                * This function also receives hand-offs from s2Member's handlers for these two Hooks:
                * `wpmu_activate_user` and `wpmu_activate_blog`.
                *
                * @package s2Member\Registrations
                * @since 3.5
                *
                * @attaches-to ``add_action("user_register");``
                *
                * @param int|str $user_id A numeric WordPress® User ID.
                * @param str $password Optional in most cases. A User's plain text Password. If unspecified, attempts are made to collect the plain text Password from other sources.
                * @param array $meta Optional in most cases. Defaults to false. An array of meta data for a User/Member.
                * @return null No return value. Returns `null` in possible every scenario.
                *
                * @todo Impossible to delete cookies when fired inside: `/wp-activate.php`?
                */
                public static function configure_user_registration ($user_id = FALSE, $password = FALSE, $meta = FALSE) 
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests