1 | <?php |
||
18 | class User extends \yii\web\User |
||
19 | { |
||
20 | public $isGuestAllowed = false; |
||
21 | |||
22 | /** |
||
23 | * @var string the seller login |
||
24 | */ |
||
25 | public $seller; |
||
26 | |||
27 | public function init() |
||
34 | |||
35 | public function not($key) |
||
44 | |||
45 | public function is($key) |
||
54 | /** |
||
55 | * @inheritdoc |
||
56 | * XXX fixes redirect loop when identity is set but the object is empty |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function getIsGuest() |
||
63 | |||
64 | /** |
||
65 | * Prepares authorization data. |
||
66 | * Redirects to authorization if necessary. |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getAuthData() |
||
92 | } |
||
93 |
If an expression can have both
false
, andnull
as possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.