igorsantos07 / yii-useridentity-trait
Trait version of Yii 1.1 UserIdentity
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii-extension
Requires
- php: >=5.4
- yiisoft/yii: >=1.1.14
This package is auto-updated.
Last update: 2023-12-28 21:45:50 UTC
README
This is a copy implementation of the original UserIdentity class, but instead as a Trait. This way you can implement
your authentication logic inside your model, if those are tightly coupled - what makes sense in REST models, for
example, where you could have a user
service that at same time retrieves data and logs in.
Most part of code was originally from CBaseUserIdentity
, so using this trait is equivalent of inheriting from that
class, except for the fact you also have to implement IUserIdentity in your class.
It is also namespaced under igorsantos07
so your IDE will not conflict with Gii or internal framework files :)