Revision #5 has been created by AndroideLP on Apr 3, 2018, 11:36:02 PM with the memo:
error code php
« previous (#4) next (#6) »
Changes
Title
unchanged
How to login from different tables in Yii2
Category
unchanged
How-tos
Yii version
unchanged
2.0
Tags
unchanged
authentication,login,different table name,multiple login
Content
changed
[...]
];
}
```
To use login:
```php
//school
\Yii::$app->scholl->login($model, $this->rememberMe ? 3600*24*30 : 0);[...]
```
For restrict access in views:
```php
<?php if (!\Yii::$app->scholl->isGuest):?>
<h1>My scholl Name: <?=\Yii::$app->scholl->identity->name?>[...]