Wiki articles tagged with "authentication"

Showing 1-2 of 2 items.

Using multiple models in an identity

Created a year ago by samdark, updated a year ago by samdark.

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

8 2
3 followers
Viewed: 24 914 times
Version: 2.0
Category: How-tos

How to login from different tables in Yii2

Created 2 years ago by AndroideLP, updated 4 months ago by lenovo.

The Problem: Yii2 utilizes by default UserIdentity configured in config/web.php for connection, this object apply one table to authentication ('identityClass' => 'app\panel\models\User'). How to authentication from diferent tables? Solution: Create instances in web.php to uses UserIdentify. eg:

5 0
6 followers
Viewed: 33 466 times
Version: 2.0
Category: How-tos