$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', ) );
This filter can be used to change the data for the user / account just before it is passed to WordPress.
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);
Version 3.1.5