| Total Complexity | 2 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class User extends ActiveRecordModel |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string $tableName name of the database table. |
||
| 10 | */ |
||
| 11 | protected $tableName = "User"; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Columns in the table. |
||
| 15 | * |
||
| 16 | * @var integer $id primary key auto incremented. |
||
| 17 | */ |
||
| 18 | public $id; |
||
| 19 | public $username; |
||
| 20 | public $password; |
||
| 21 | public $created; |
||
| 22 | public $updated; |
||
| 23 | public $activity; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * A database driven model. |
||
| 27 | */ |
||
| 28 | /** |
||
| 29 | * Set the password. |
||
| 30 | * |
||
| 31 | * @param string $password the password to use. |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function setPassword($password) |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Verify the acronym and the password, if successful the object contains |
||
| 42 | * all details from the database row. |
||
| 43 | * |
||
| 44 | * @param string $acronym acronym to check. |
||
| 45 | * @param string $password the password to use. |
||
| 46 | * |
||
| 47 | * @return boolean true if acronym and password matches, else false. |
||
| 48 | */ |
||
| 49 | public function verifyPassword($username, $password) |
||
| 55 |