Hi all,
I hope that this is the right place to ask for help ^_^
I'm trying to script a little php code to add a new user to the wiki by php
I use something simlar to this:
$newuserarray=array();
$newuserarray[0]='pippo';
$newuserarray[1]='pass';
$newuserarray[2]='prova(a)mail.com'com';
$newuserarray[3]='truename';
$NextUser=User::newFromName( $newuserarray[0] );
$NextUser->setEmail( $newuserarray[2] );
$NextUser->setRealName( $newuserarray[3] );
$uid=$NextUser->idForName();
if ($uid===0) {
$NextUser->addToDatabase();
$NextUser->setPassword( $newuserarray[1] );
$NextUser->saveSettings();
}
running it $NextUser is correctly created but the user is non in the
MySQL table (user)
what I'm doing wrong ?
thanks
Show replies by date