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