Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function registerAccount($userName, $password, $email, $expansion /*, $recruiter */)
- {
- $passwordHash = strtoupper(sha1(strtoupper($username) . ':' . strtoupper($password)));
- $account = new Account($userName, $passwordHash, $email, $expansion);
- $mysqlConn = new mysqli($mysqlHost, $mysqlUser, $mysqlPassword, $accountDb);
- if(!$mysqlConn->query("INSERT INTO account (username, sha_pass_hash, email, expansion)
- VALUES ('" . $account->userName . "', '" . $account->passwordHash . "',"
- . "'" . $account->email . "', " . $account->expansion))
- {
- return FALSE;
- }
- $mysqlConn->close();
- return $account;
- }
Add Comment
Please, Sign In to add comment