Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Users {
- /**
- * @param string $username
- * @param string $email
- * @return \PDOStatement|false
- */
- public function isUniq($username, $email)
- {
- return $this->query("SELECT username, email FROM users WHERE username = ? OR email = ?", [$username, $email], true);
- }
- /**
- * @param string $username
- * @param string $password
- * @param string $email
- * @param string $token
- * @return void
- **/
- public function register($username, $password, $email, $token)
- {
- $this->query("INSERT INTO users SET username = ?, password = ?, email = ?, confirmation_token = ?", [
- $username, $password, $email, $token
- ], true);
- }
- }
Add Comment
Please, Sign In to add comment