https://github.com/igorsantos07/yii-useridentity-trait
Yii 1.1 UserIdentity reimplemented as a trait
https://github.com/igorsantos07/yii-useridentity-trait
Last synced: 3 months ago
JSON representation
Yii 1.1 UserIdentity reimplemented as a trait
- Host: GitHub
- URL: https://github.com/igorsantos07/yii-useridentity-trait
- Owner: igorsantos07
- Created: 2014-07-07T19:57:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-18T18:37:23.000Z (almost 11 years ago)
- Last Synced: 2025-01-04T20:43:34.267Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii 1.1's UserIdentity, trait version
=====================================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 :)