1 | <?php |
||
24 | trait AdditionalAccountTrait |
||
25 | { |
||
26 | use PasswordTrait; |
||
27 | |||
28 | /** |
||
29 | * @var boolean|string The attribute of which determines whether enable to |
||
30 | * login with current additional account. You can assign it to false ff you |
||
31 | * want to disable this feature, this is equivolent to not allow to login |
||
32 | * with current additional account among all the users. |
||
33 | */ |
||
34 | public $enableLoginAttribute = false; |
||
35 | |||
36 | /** |
||
37 | * @var boolean|string Determines whether login with current additional |
||
38 | * account with an independent password or not. If you set $enableLoginAttribute |
||
39 | * to false, this feature will be skipped. |
||
40 | */ |
||
41 | public $independentPassword = false; |
||
42 | |||
43 | /** |
||
44 | * Get this additional account could be used for logging-in. |
||
45 | * @return boolean |
||
46 | */ |
||
47 | 1 | public function getCanBeLogon() |
|
55 | |||
56 | /** |
||
57 | * Set this additional accunt could be used for logging-in. |
||
58 | * @param boolean $can |
||
59 | * @return integer |
||
60 | */ |
||
61 | 1 | public function setCanBeLogon($can) |
|
69 | |||
70 | /** |
||
71 | * Get rules associated with enable login attribute. |
||
72 | * If enable login feature by this additional account, it will return the rules |
||
73 | * with true by default. |
||
74 | * @return array rules. |
||
75 | */ |
||
76 | 6 | public function getEnableLoginAttributeRules() |
|
83 | |||
84 | /** |
||
85 | * Get rules associated with additional account attributes. |
||
86 | * @return array rules. |
||
87 | */ |
||
88 | 6 | public function getAdditionalAccountRules() |
|
96 | } |
||
97 |