0) { $error = 'This username or e-mail address has already been used.'; } else { $registerInfo = create_user($username, $email, $password, $_SERVER['REMOTE_ADDR']); if($registerInfo['user_id'] < 1) { $error = 'Failed to create user.'; } else { if(!empty($registerInfo['verification'])) { setcookie('fmfas', '', 0, '/'); $mailer->send( (new Swift_Message('flash.moe message board activation')) ->setFrom(['system@flash.moe' => 'flash.moe']) ->setTo([$email => $username]) ->setBody( "Hey {$username},\r\n\r\n". "Click the following link to activate your account:\r\n\r\n". "\r\n" ) ); $message = 'Your account has been created! A verification link has been sent to your e-mail address.'; } else { header('Location: /login?m=welcome'); return; } } } } } } include FMF_LAYOUT . '/header.php'; ?>

Register