Difference between #2 and #3 of
How to login from different tables in Yii2

Revision #3 has been created by AndroideLP on Apr 3, 2018, 11:34:00 PM with the memo:

error in code tag
« previous (#2) next (#4) »

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

[...]
```
My config/web.php

```php

 
'user' => [
'class'=>'yii\web\User',
'identityClass' => 'app\models\User',
[...]
],
```

 
Note for each there is a identifyClass and one view login.
Now, we need to create the models:
[...]
```php

//behaviors of the school
public function behaviors()
{
[...]
```php

 
<?php if (!\Yii::$app->scholl->isGuest):?>
<h1>My scholl Name: <?=\Yii::$app->scholl->identity->name?>
<?php endif;?>

<?php if (!\Yii::$app->teacher->isGuest):?>
<h1>Teacher Name: <?=\Yii::$app->teacher->identity->name?>
[...]
5 0
6 followers
Viewed: 64 346 times
Version: 2.0
Category: How-tos
Written by: AndroideLP
Last updated by: lenovo
Created on: Apr 3, 2018
Last updated: 4 years ago
Update Article

Revisions

View all history