topical media & game development
portal-classes-core.user.php
<?php
class User {
var core) {
core;
correctForm = 1;
_POST["user"];
_POST["email"];
_POST["pass"];
_POST["redopass"];
check_usernameQuery = "SELECT *
FROM users
WHERE user_name = '".check_emailQuery = "SELECT *
FROM users
WHERE user_email = '".this->core->Db->getQueryNumRows(string = "Username already exists. Please choose a different username";
username) < 4) {
correctForm = 0;
}
if (redopass) { //Check if pass is the same as redo pass.
correctForm = 0;
}
if (strlen(string = "The password is less than 6 characters. Please choose a different password.";
email,"@") == FALSE ) {
correctForm = 0;
}
if (check_emailQuery) != 0) {
correctForm = 0;
}
if (ipadress = pass = md5(insert_usernameQuery = "INSERT INTO `user_temp`
(`user_name` , `user_email` , `user_password` , `user_ipaddress` , `user_temp_registrationtime` )
VALUES ('".email."','".ipadress."', ".this->core->Db->doQuery(string = username, this->core->PageComm->setPageCommVar('Error',username, link = md5(to = subject = "User registration climate portal";
body = "Dear ".link."\n\nWith kind regards,\n\nThe Climate portal team";
if (mail(subject, headers)) {
header('Location: index.php?Page=Emailconf');
} else {
string);
}
function userConfirmation () {
_GET['id'];
_SERVER["REMOTE_ADDR"];
check_usernameQuery = "SELECT *
FROM user_temp
WHERE user_ipaddress = '".usernameQuery = check_usernameQuery);
if (string = "<div class=\"error_message\">The ip adress used for the confirmation of this account is unknown, please confirm your account on the same ip addres that you used to registrate your account";
}
usernameQuery[0]['user_email'];
emailDataHash);
if (emailHash) {
usernameQuery[0]['user_name']."','".usernameQuery[0]['user_password']."','".remove_userQuery = "DELETE FROM `user_temp`
WHERE `user_temp`.`user_temp_id` = ".this->core->Db->doQuery(this->core->Db->doQuery(string = "<div class=\"text_box\">Your user account has been confirmed, you can now login using your username and passsword";
}
string);
}
function userLogin () {
_POST['username'];
_POST['password'];
password);
userName."'
AND user_password = '".userLoginResults = query_userLogin);
if (Month = 2592000 + time(); //this adds 30 days to the current time
setcookie("user_Id", Month);
header('Location: index.php');
} else {