1 | <?php |
||
31 | trait AdditionalAccountTrait |
||
32 | { |
||
33 | use PasswordTrait; |
||
34 | |||
35 | /** |
||
36 | * @var boolean|string The attribute of which determines whether enable to |
||
37 | * login with current additional account. You can assign it to false if you |
||
38 | * want to disable this feature, this is equivolent to not allow to login |
||
39 | * with current additional account among all the users. |
||
40 | */ |
||
41 | public $seperateLoginAttribute = false; |
||
42 | |||
43 | /** |
||
44 | * @var boolean Determines whether login with current additional |
||
45 | * account with a seperate password or not. If you set $enableLoginAttribute |
||
46 | * to false, this feature will be skipped. |
||
47 | */ |
||
48 | 5 | public function getPasswordIsSeperate() |
|
52 | |||
53 | /** |
||
54 | * Get this additional account could be used for logging-in. |
||
55 | * @return boolean |
||
56 | */ |
||
57 | 5 | public function getSeperateLogin() |
|
65 | |||
66 | /** |
||
67 | * Set this additional accunt could be used for logging-in. |
||
68 | * @param boolean $can |
||
69 | * @return integer |
||
70 | */ |
||
71 | 3 | public function setSeperateLogin($can) |
|
79 | |||
80 | /** |
||
81 | * Get rules associated with enable login attribute. |
||
82 | * If enable login feature by this additional account, it will return the rules |
||
83 | * with true by default. |
||
84 | * @return array rules. |
||
85 | */ |
||
86 | 5 | public function getEnableLoginAttributeRules() |
|
93 | |||
94 | /** |
||
95 | * Get rules associated with additional account attributes. |
||
96 | * @return array rules. |
||
97 | */ |
||
98 | 5 | public function getAdditionalAccountRules() |
|
106 | } |