Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function add(User $user)
- {
- //On prépare la requête
- $req = $this->db->prepare('INSERT INTO users SET username = :name, password = :pass, mail = :mail, credits = 500000,
- last_offline = :last_off, account_created = :account_c, ip_reg = :ip, ip_last = :ip_l');
- //On je ne sais pas quoi
- $req->bindValue('name' , $user->username());
- $req->bindValue('password' , $user->password());
- $req->bindValue('mail' , $user->email());
- $req->bindValue('last_off' , Engine::LightDate('complete'));
- $req->bindValue('account_c' , Engine::LightDate('hc'));
- $req->bindValue('ip' , $_SERVER['REMOTE_ADDR']);
- $req->bindValue('ip_l' , $_SERVER['REMOTE_ADDR']);
- //On execute
- $req->execute();
- }
Add Comment
Please, Sign In to add comment