Awesome Support Developer Documentation

wpas_insert_user_data


Signature

$args = apply_filters( 'wpas_insert_user_data', array(
'user_login' => $username,
'user_email' => $user['email'],
'first_name' => $user['first_name'],
'last_name' => $user['last_name'],
'display_name' => "{$user['first_name']} {$user['last_name']}",
'user_pass' => $user['pwd'],
'role' => 'wpas_user',
) );

Typical Usage

This filter can be used to change the data for the user / account just before it is passed to WordPress.

Example Usage

function wpas_my_set_username( $args ) {
// set the user login name to the user email address
$args['user_login'] = $args['user_email'];
return $args;
}
add_filter('wpas_insert_user_data', 'wpas_my_set_username', 10, 1);

First Available

Version 3.1.5


More Topics In Filter Hooks

Share: