1 | <?php |
||
10 | class User extends ActiveRecordModel |
||
11 | { |
||
12 | /** |
||
13 | * @var string $tableName name of the database table. |
||
14 | */ |
||
15 | protected $tableName = "rv1_users"; |
||
16 | |||
17 | |||
18 | /** |
||
19 | * Columns in the table. |
||
20 | * |
||
21 | * @var integer $id primary key auto incremented. |
||
22 | */ |
||
23 | public $id; |
||
24 | public $role; |
||
25 | public $username; |
||
26 | public $password; |
||
27 | public $email; |
||
28 | public $created; |
||
29 | public $updated; |
||
30 | public $deleted; |
||
31 | |||
32 | |||
33 | /** |
||
34 | * Set the password. |
||
35 | * |
||
36 | * @param string $password the password to use. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | 1 | public function setPassword($password) |
|
44 | |||
45 | |||
46 | /** |
||
47 | * Verify the username and the password, if successful the object contains |
||
48 | * all details from the database row. |
||
49 | * |
||
50 | * @param string $username username to check. |
||
51 | * @param string $password the password to use. |
||
52 | * |
||
53 | * @return boolean true if username and password matches, else false. |
||
54 | */ |
||
55 | 2 | public function verifyPassword($username, $password) |
|
60 | |||
61 | 1 | public function gravatar() |
|
65 | } |
||
66 |