devo fare uno script per creare un nuovo utente
è corretto???
<?php
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$edit = array(
'name' => 'New User',
'mail' => '<a href="mailto:[email protected]" rel="nofollow">[email protected]</a>',
'status' => 1,
'init' => '<a href="mailto:[email protected]" rel="nofollow">[email protected]</a>',
);
user_save(NULL, $edit);
?>
No :D
La email ed init sono dei plain text e non un html.
Non ho il Link sottomano, ma se cerchi su internet (specificando drupal 7) trovi dei post sull'argomento.
Comunque parti da questo:
$account = new stdClass();
$account->name = time();
$account->pass = user_hash_password($pass);
$account->init = $form_state['values']['email_new'];
$account->roles = $roles;
$account->status = 1;
$account->created = time();
$account->mail = $form_state['values']['email_new'];
$account->language = 'it';
$account->signature_format = 'plain_text';
$account = user_save($account);
M.
--
Michel 'ZioBudda' Morelli -- [email protected]
Sviluppo applicazioni CMS DRUPAL e web dinamiche -- Corsi Drupal -- Amministrazione Drupal -- Hosting Drupal