Using multiple models in an identity

Comparing #1 with #2

Revision #2 was created by samdark samdark on Jan 29, 2019, 11:11:01 PM.

Fixed typo

Tags

authentication,identity

Content

[...]
}
```

In the above we assume that our ids are like `customer-23` or `supplier-34`. When we need to get identity instance we split the id by `-` and getting both type and integer id for the model corresponding to that type.

Having identity we can tell Yii to use it via `confi
ng/main.php`:

```php
[
// ...
'components' => [
[...]