Definition at line 5 of file User.php.
| __construct |
( |
|
$id = null | ) |
|
Definition at line 28 of file User.php.
30 $this->
register = $this->lastVisit = $this->lastConnect = new \DateTime();
32 parent::__construct(
$id);
Definition at line 45 of file User.php.
47 if ($key ==
"password")
49 return parent::__set($key, $value);
Definition at line 35 of file User.php.
37 return password_verify($value, $this->password);
Definition at line 7 of file User.php.
10 $result = self::$dbo->exec(
"CREATE TABLE IF NOT EXISTS `{$dbPrefix}user` (
11 `id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
12 `email` VARCHAR(128) NOT NULL UNIQUE,
13 `password` VARCHAR(64),
14 `sexe` ENUM('MALE', 'FEMALE') NULL,
15 `optin` BOOLEAN DEFAULT FALSE,
16 `register` DATETIME NOT NULL,
17 `lastConnect` DATETIME NOT NULL,
18 `lastVisit` DATETIME NOT NULL,
19 `registerIp` VARCHAR(42) NOT NULL,
20 `lastConnectIp` VARCHAR(42) NOT NULL,
21 `lastVisitIp` VARCHAR(42) NOT NULL
23 if ($result ===
false)
24 throw new \Exception(get_class().
": ".self::$dbo->errorInfo()[2]);
Definition at line 40 of file User.php.
42 parent::__set(
"password", password_hash($value, PASSWORD_BCRYPT));
The documentation for this class was generated from the following file: