F
Filamentβ€’4d ago
jjo63

User maintenance flow - default in Filament

Hi, couple of questions relating to user management. 1) I have a resource based on the User model and, predictably, I have the password field included - if I want to create a user I can add a record here and set my own password for that user. Anytime you want to update that user record you have to typoe in a password. Of course what I really want is a means to set a password that is independent of any update to other user fields and I wondered if this is available out of the box - or if not, some ideas as to how others have implemented this? 2) Ideally I want the process flow to be that an admin user creates another user's record (without a password) and that new user then sets their own password on first logging-in - not necessarily wedded to this flow but it seems quite straightforward (and keeps the knowledge of the password private to the new user) - but again happy to learn of examples of best practise (if there are some tutorials or links to docs on how to achieve). I have been browsing the Filament docs and couldn't see where these fundamentals of user management were discussed. If I have to use another plugin, happy to do so. thanks as ever, j
7 Replies
rhysleesdev
rhysleesdevβ€’3d ago
You could use a package like this. it creates a user with a random password and sends them an invite notification with a link to reset the password https://filamentphp.com/plugins/tapp-network-invites You could also create this yourself quite easily without the package
jjo63
jjo63OPβ€’3d ago
Thanks, this suggestion helps with question 2 from above. Regarding question 1, any suggestions? I am almost expecting the response to be a link to a Filament doc pages I haven't come across yet πŸ™‚
rhysleesdev
rhysleesdevβ€’2d ago
just remove the password field from the form
jjo63
jjo63OPβ€’2d ago
Hi, that was obviously one thought πŸ™‚ - wondered if perhaps Filament already had the various types of user maint forms available by default (such as loggged-in user changing own password).
jjo63
jjo63OPβ€’this hour
Just came across this - https://github.com/joaopaulolndev/filament-edit-profile - looks like it might be a nice packaging of some of what I was seeking.
GitHub
GitHub - joaopaulolndev/filament-edit-profile: Filament package to ...
Filament package to edit profile really fast. Contribute to joaopaulolndev/filament-edit-profile development by creating an account on GitHub.
rhysleesdev
rhysleesdevβ€’14h ago
@jjo63 filament ships with a user profile page https://filamentphp.com/docs/3.x/panels/users#authentication-features enable it with ->profile() in the Panels Provider

Did you find this page helpful?