• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Validation email nicaw website

vagnerz1k

New Member
Joined
Nov 5, 2014
Messages
35
Reaction score
0
hello guys
I am here again to ask for help with site email validation

the error is this one
Strict Standards: Non-static method AAC :: validEmail () should not be called statically in C: \ xampp \ htdocs \ modules \ account_create.php on line 11

<?php
include ("../include.inc.php");

//retrieve post data
$form = new Form('newaccount');
//check if any data was submited
if ($form->exists()){
//image verification
if ($form->validated()){
//email formating rules
if (AAC::ValidEmail($form->attrs['email'])){

$account = new Account();
do
$account->setAttr('accno', rand(100000,999999));
while ($account->exists());
//set account atrributes
$accno = $account->getAttr('accno');
if ($form->attrs['password'] == $form->attrs['confirm'] && AAC::ValidPassword($form->attrs['password']))
$password = $form->attrs['password'];
else
$password = substr(str_shuffle('qwertyuipasdfhjklzxcvbnm123456789'), 0, 6);
$account->setPassword($password);
$account->setAttr('email',$form->attrs['email']);
//create the account
$account->save();

if ($cfg['Email_Validate']){
$body = "Here is your login information for <a href=\"http://$cfg[server_url]/\">$cfg[server_name]</a><br/>
<b>Account number:</b> $accno<br/>
<b>Password:</b> $password<br/>
<br/>";
//send the email
require_once("../extensions/class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host = $cfg['SMTP_Host'];
$mail->Port = $cfg['SMTP_Port'];
$mail->SMTPAuth = $cfg['SMTP_Auth'];
$mail->Username = $cfg['SMTP_User'];
$mail->Password = $cfg['SMTP_Password'];

$mail->From = $cfg['SMTP_From'];
$mail->AddAddress($form->attrs['email']);

$mail->Subject = $cfg['server_name'].' - Login Details';
$mail->Body = $body;

if ($mail->Send()){
//create new message
$msg = new IOBox('message');
$msg->addMsg('Your login details were emailed to '.$form->attrs['email']);
$msg->addClose('Finish');
$msg->show();
}else
$error = "Mailer Error: " . $mail->ErrorInfo;

}else{
//create new message
$msg = new IOBox('message');
$msg->addMsg('Please write down your login information:');
$msg->addInput('account','text',$accno,50,true);
$msg->addInput('password','text',$password,50,true);
$msg->addMsg('You can now login into your account and start creating characters.');
$msg->addClose('Finish');
$msg->show();
$account->logAction('Created');
}
}else{ $error = "Bad email address";}
}else{ $error = "Image verification failed";}
if (!empty($error)){
//create new message
$msg = new IOBox('message');
$msg->addMsg($error);
$msg->addReload('<< Back');
$msg->addClose('OK');
$msg->show();
}
}else{
//create new form
$form = new IOBox('newaccount');
$form->target = $_SERVER['PHP_SELF'];
$form->addLabel('Create Account');
$form->addInput('email');
$form->addInput('password','password');
$form->addInput('confirm','password');
$form->addCaptcha();
$form->addClose('Cancel');
$form->addSubmit('Next >>');
$form->show();
}?>
 
Last edited:
Back
Top