Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_create_user [ WordPress Function ]

wp_create_user ( $username, $password, $email = '' )
Parameters:
  • (string) $username The user's username.
  • (string) $password The user's password.
  • (string) $email The user's email (optional).
See:
Returns:
  • (int) The new user's ID.
Defined at:



A simpler way of inserting an user into the database.

Creates a new user with just the username, password, and email. For more complex user creation use wp_insert_user() to specify more information.

Source


<?php
function wp_create_user($username$password$email '') {
    
$user_login esc_sql$username );
    
$user_email esc_sql$email    );
    
$user_pass $password;

    
$userdata compact('user_login''user_email''user_pass');
    return 
wp_insert_user($userdata);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics