Hallo, kann mir Jemand hier diese Funktionen aus dem WBB_Connect auf dieses Plugin umschreiben?
public _WBB_SetMySQLData ( _Server[ ] , _User[ ] , _Password[ ] , _Database[ ] , _InstallationCount ) {
mysql_debug ( 1 );
MySQL[ Installation ] = _InstallationCount;
MySQL[ Handle ] = mysql_connect ( _Server , _User , _Database , _Password );
return mysql_ping ( MySQL[ Handle ] ) == -1 ? false : true;
}
public _WBB_AddNewUser ( Username[ ] , Password[ ] , Email[ ] , ActivationState ) {
if ( IsValidEmail ( Email ) )
return -1;
if ( IsValidUser ( Username ) )
return 0;
new Query[ 256 ] , Salt[ 64 ];
strcat ( Salt , CreateSalt ( ) );
mysql_format ( MySQL[ Handle ] , Query ,
"INSERT INTO `wcf%d_user` (username,email,password,salt,languageID,registrationDate,activationCode) VALUES ('%s','%s','%s','%s',1,%i,%i)" , MySQL[ Installation ] , Username , Email , GetDoubleSaltedHash ( Password , Salt ) , Salt , TimestampNow ( ) , ActivationState ? 0 : GenerateRandomValue ( ) );
mysql_query ( Query , -1 , -1 , MySQL[ Handle ] );
AddUserToGroup ( Username , 1 );
if ( ActivationState )
AddUserToGroup ( Username , 3 );
return true;
}
public _WBB_SendUserActivationMail ( Username[ ] , Sendername[ ] , Servername[ ] , ForumIndexURL[ ] ) {
if ( !IsValidUser ( Username ) )
return false;
return SendMail ( Username , Sendername , Servername , ForumIndexURL );
}
Wäre wirklich überaus nett von euch.