1 | <?php |
||
3 | class PasswordResetForm extends CFormModel |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * The user's new password |
||
7 | * @var string $password |
||
8 | */ |
||
9 | public $password; |
||
10 | |||
11 | /** |
||
12 | * The user's new password repeated |
||
13 | * @var string $password_repeat |
||
14 | */ |
||
15 | public $password_repeat; |
||
16 | |||
17 | /** |
||
18 | * |
||
19 | * @var string $reset_key |
||
20 | */ |
||
21 | public $reset_key; |
||
22 | |||
23 | /** |
||
24 | * The user model |
||
25 | * @var Users $_user |
||
26 | */ |
||
27 | private $_user; |
||
28 | |||
29 | /** |
||
30 | * The hash model |
||
31 | * @var UserMetadata $_hash |
||
32 | */ |
||
33 | private $_hash; |
||
34 | |||
35 | /** |
||
36 | * The expires model |
||
37 | * @var UserMetadata $_expires |
||
38 | */ |
||
39 | private $_expires; |
||
40 | |||
41 | /** |
||
42 | * Validation rules |
||
43 | * @return array |
||
44 | */ |
||
45 | public function rules() |
||
54 | |||
55 | /** |
||
56 | * Attribute labels |
||
57 | * @return array |
||
58 | */ |
||
59 | public function attributeLabels() |
||
67 | |||
68 | /** |
||
69 | * Validates that the reset key is valid and that it belongs to a user |
||
70 | * @param array $attributes |
||
71 | * @param array $params |
||
72 | * @return boolean |
||
73 | */ |
||
74 | public function validateResetKey($attributes=array(), $params=array()) |
||
102 | |||
103 | /** |
||
104 | * Resets the user's password |
||
105 | * @return boolean |
||
106 | */ |
||
107 | public function save() |
||
126 | } |
||
127 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.