| 1 | <?php |
||
| 10 | class User extends ActiveRecordModel |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string $tableName name of the database table. |
||
| 14 | */ |
||
| 15 | protected $tableName = "User"; |
||
| 16 | |||
| 17 | |||
| 18 | /** |
||
| 19 | * Columns in the table. |
||
| 20 | * |
||
| 21 | * @var integer $id primary key auto incremented. |
||
| 22 | */ |
||
| 23 | public $id; |
||
| 24 | public $acronym; |
||
| 25 | public $password; |
||
| 26 | public $email; |
||
| 27 | public $created; |
||
| 28 | public $updated; |
||
| 29 | public $deleted; |
||
| 30 | public $active; |
||
| 31 | public $admin; |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Set the password. |
||
| 36 | * |
||
| 37 | * @param string $password the password to use. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | 1 | 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 | 2 | public function verifyPassword($acronym, $password) |
|
| 61 | } |
||
| 62 |