c_ws_plugin__s2member_registrations
public class c_ws_plugin__s2member_registrations
3.5
( 10 Methods ) Method Summary | |
---|---|
public static null | configure_user_on_ms_blog_activation(int|str $blog_id, int|str $user_id, str $password, str $title, array $meta) Configures new Users on a Multisite Network installation. |
public static null | configure_user_on_ms_user_activation(int|str $user_id, str $password, array $meta) Configures new Users on a Multisite Network installation. |
public static null | configure_user_registration(int|str $user_id, str $password, array $meta) Configures all new Users. |
public static str | generate_password(str $password) Filters WordPress® randomly generated Passwords. |
public static obj|array | ms_activate_existing_user(obj $_error, array $vars) Intersects with |
public static int|false | ms_create_existing_user(str $user_login, str $user_email, str $user_pass, int|str $user_id) For Multisite Networks, this function is used to add a User to an existing Blog; and to simulate |
public static null | ms_process_signup_hidden_fields() Adds hidden fields for |
public static array | ms_process_signup_meta(array $meta) Adds Customs Fields to |
public static obj | ms_register_existing_user(obj $errors, str $user_login, str $user_email) Intersects with |
public static array | ms_validate_user_signup(array $result) Filters Multisite User validation. |
public static null configure_user_on_ms_blog_activation(int|str $blog_id, int|str $user_id, str $password, str $title, array $meta)
Configures new Users on a Multisite Network installation.
This does NOT fire for a Super Admin managing Network Blogs. Actually it does; BUT it's blocked by the routine below. A Super Admin should NOT trigger this event.
This function should ONLY be fired through /wp-activate.php
.
Or also through /activate
via BuddyPress.
3.5
add_action("wpmu_activate_blog");
int|str $blog_id - A numeric WordPress® Blog ID.
int|str $user_id - A numeric WordPress® User ID.
str $password - Plain text Password should be passed through by the Action Hook.
str $title - The title that a User chose during signup; for their new Blog on the Network.
array $meta - Expects an array of $meta
details, passed through by the Action Hook.
null
public static null configure_user_on_ms_user_activation(int|str $user_id, str $password, array $meta)
Configures new Users on a Multisite Network installation.
This can ONLY be fired in the admin via /user-new.php
.
Or also during an actual activation; through /wp-activate.php
.
Or also during an actual activation; through /activate
via BuddyPress.
3.5
add_action("wpmu_activate_user");
int|str $user_id - A numeric WordPress® User ID.
str $password - Plain text Password should be passed through by the Action Hook.
array $meta - Expects an array of $meta
details, passed through by the Action Hook.
null
public static null configure_user_registration(int|str $user_id, str $password, array $meta)
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
.
3.5
add_action("user_register");
int|str $user_id - A numeric WordPress® User ID.
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.
array $meta - Optional in most cases. Defaults to false. An array of meta data for a User/Member.
null - No return value. Returns null
in possible every scenario.
Impossible to delete cookies when fired inside: /wp-activate.php
?
public static str generate_password(str $password)
Filters WordPress® randomly generated Passwords.
Also captures Passwords generated by WordPress® (with a global var), for internal use.
3.5
add_filter("random_password");
str $password - Expects a plain text Password passed through by the Filter.
str - Password, possibly assigned through s2Member Custom Registration/Profile Field input.
public static obj|array ms_activate_existing_user(obj $_error, array $vars)
Intersects with wpmu_activate_signup()
through s2Member's Multisite Networking patch.
This function should return the same array that wpmu_activate_signup()
returns; with the assumption that $user_already_exists
.
Which is exactly where this function intersects inside the /wp-includes/ms-functions.php
.
This can ONLY be fired through /wp-activate.php
on the front-side.
Or through /activate
via BuddyPress.
3.5
add_filter("_wpmu_activate_existing_error_");
obj $_error - Expects a WP_Error
object to be passed through by the Filter.
array $vars - Expects the defined variables from the scope of the calling Filter.
obj|array - If unable to add an existing User, the original $_error
obj is returned. Otherwise we return an array of User details for continued processing by the caller.
public static int|false ms_create_existing_user(str $user_login, str $user_email, str $user_pass, int|str $user_id)
For Multisite Networks, this function is used to add a User to an existing Blog; and to simulate wp_create_user()
behavior.
The $user_id
value will be returned by this function, just like wp_create_user()
does.
This function will fire the Hook user_register
.
3.5
str $user_login - Expects the User's Username.
str $user_email - Expects the User's Email Address.
str $user_pass - Expects the User's plain text Password.
int|str $user_id - Optional. A numeric WordPress® User ID. If unspecified, a lookup is performed with $user_login
and $user_email
.
int|false - Returns numeric $user_id
on success, else false on failure.
public static null ms_process_signup_hidden_fields()
Adds hidden fields for $_POST
vars on signup.
This can ONLY be fired through /wp-signup.php
on the front-side.
Or through /register
via BuddyPress.
3.5
add_filter("signup_hidden_fields");
null
public static array ms_process_signup_meta(array $meta)
Adds Customs Fields to $meta
on signup.
This can ONLY be fired through /wp-signup.php
on the front-side.
Or possibly through /user-new.php
in the admin.
Or through /register
via BuddyPress.
3.5
add_filter("add_signup_meta");
add_filter("bp_signup_usermeta");
array $meta - Expects an array of meta-data to be passed in by the Filter.
array - Full $meta
array with s2Member Custom Fields included.
public static obj ms_register_existing_user(obj $errors, str $user_login, str $user_email)
Intersects with register_new_user()
through s2Member's Multisite Networking patch.
This function Filters registration errors inside /wp-login.php
via register_new_user()
.
When an existing Multisite User is registering, this takes over registration processing.
This can ONLY be fired through /wp-login.php
on the front-side.
3.5
add_filter("registration_errors");
obj $errors - Expects a WP_Error
object passed in by the Filter.
str $user_login - Expects the User's Username, passed in by the Filter.
str $user_email - Expects the User's Email Address, passed in by the Filter.
obj - A WP_Error
object, or exits script execution after handling registration redirection.
public static array ms_validate_user_signup(array $result)
Filters Multisite User validation.
This can ONLY be fired through /wp-signup.php
on the front-side.
Or through /register
via BuddyPress.
3.5
add_filter("wpmu_validate_user_signup");
array $result - Expects a $result
array to be passed through by the Filter.
array - The Filtered $result
array. Possibly containing errors introduced by s2Member.
Registration handlers.