There’s so much confusion, so many modules that seem dead and I thought about creating this thread, thanks
There’s so much confusion, so many modules that seem dead and I thought about creating this thread, thanks
Hi @paskuale,
This is just my personal opinion, but my answer is there’s none.
The user management is really a must have functionality in almost all web application. But at the same time the business requirement regarding user management differs from app to app. So it’s quite difficult to find an extension that satisfies the exact needs of a specific app. Sometimes it’s too bloated for your app, and sometimes it lacks the critical functionality to your app.
Meanwhile, yii lets you write your own user management module quite easily with the concept of UserIdentity
interface. You can create a table for the users with any attribute you want it to have. And gii will create a CRUD skeleton for it that is ready to be customized. Usually this process is rather easier and more satisfying than adopting some third party extension.
So I look for some examples of using this UserIdentity
, thanks
You can see User
model in yii2-app-basic. This is the simplest example that implements UserIdentity
interface. Unfortunately it’s not suitable for user management in an ordinary web app, because it is not backed by a db table.
You can see much more practical an example in yii2-app-advanced template, which is User
ActiveRecord model that implements UserIdentity
interface. It also supports ‘registration’, ‘confirmation via email’, ‘forgot password’, … etc.
I usually start from yii2-app-basic, not from yii2-app-advanced, because the former is more practical than the latter as a whole.
This is what I would usually do regarding the user management:
User
model.user
table in my db.User
model using gii.User
model to implement UserIdentity
interface.And …
mdmsoft\yii2-admin
extension to support ACF and RBAC.User
model.Implementing authentication and authorization is not a trivial thing and I always spend a lot of time for it.
Thanks for who work with advanced instead? Any solution?
I’m sorry, but I don’t understand what you want to ask.
Please try to be more specific about what you want for you app, then someone may be able to suggest a solution.
For a general purpose solution with admin gui, I would take a look at https://github.com/2amigos/yii2-usuario
It’s based on a previously popular extension which is no longer in active development.
It works with the advanced starter template and you can separate the users from the admin or front-end or keep them as one.
You get login, register, forgotten password functionality and editable templates out of the box.
yii2-app-advanced.
so the project is valid? He seemed forgotten by everyone…
sjaakp/yii2-pluto excellent. RBAC. Dropped the other two you mentioned. No problems as yet. Integrates really well with yii2 advanced template. Deserves a lot more stars! He has followed up with improvements that I have suggested on GitHub.
I have got the impression in the past that the best way to do this is to write your own code with the built in rbac.
I generally just build little apps with a couple of users so this works for me as it lets me edit in an admin area without having to write everything to do it.
I’ve not tries the recently suggested yii2-pluto
yii2-pluto also looks very new and has no commits for 4 months and 14 in total.
So I would give it a miss for now.
I have the same issue now, looking for some good module to manage users. I think I try the yii2-usario. Did someone tried it in the meantime?