I want to create a Drupal user account without an email开发者_运维百科 address. How can I create that? If I write a custom query which tables do I have to insert values in? Or does Drupal have a built-in function for that?
I have only user's first name, last name, password details. I want to create a user with only this information.
This will work, even email is required:
$newUser = array(
'name' => 'your username',
'pass' => 'any password', // note: do not md5 the password
'status' => 1,
);
user_save(null, $newUser);
精彩评论