Advise - How do I best create "profile pages" for users

hi everyone, i thought maybe i can ask this here and decide after reading your comments.

my scenario for a new feature of a project:

people that work together with my customer (website owner) will be able to create users via a frontend formular. they first fill out the form, submit it as a kind of application, then my customer reviews the submission and decides who is accepted and who is not. after someone gets accepted they can login in the panel and can only adjust their user information, which is pretty much almost ready because the data comes from the form they filled out at the beginning.

some of these infos will be then displayed in the frontend in the “members” area, for instance a the name, a short text, a picture, things like that. the users can decide which fields they want to show in the frontend. some infos are only for internal purposes and cannot be activated for frontend use.

so, now the question. how would you handle the data and use it for the frontend? i was thinking about putting everything inside each user and then just create virtual pages from this information for the frontend. if a user logs in, then they have only access to the own user.

the second option is having a user and a page. the user would only be used to handle the email and the password, so the login info so to speak, and the page would contain everything else.

the main advantage i see for the second option is that it is a lot simpler to extend areas in the “Site” area than in the “Accounts” area. i could for instance show the members with some extra data like type of member on the list view, active or inactive with a green or red dot, things like that. at the same time it feels maybe a bit strange to have a user and a page when this could be solved with only a user.

looking forward to some opinions and maybe experiences regarding this kind of situation.

thanks in advance

Without the extra requirement for showing more information in the users view, I’d say go for the account-only approach, because it doesn’t need extra permissions, the user account is only accessible by the user by default. But you need either virtual pages or at least routes to display the user profiles. So having the profiles as separate users simplifies that.

For the split profile, you need to set up permissions for the pages, but that’s not that hard after all.

Maybe there are more arguments in favor of the separate profile pages after all.

1 Like

thank you sonja. yes for the second approach i would use the bouncer plugin. i will do a small test i think and see if with k4 i manage to make the “Accounts” area a bit organized. in case you know how to make the tab “Admin” open as default and not “All” that would be a huge thing already. otherwise when an admin visits the area a huge wall of users will be there. it is an extremely minor thing, but would feel nicer.

Bildschirmfoto 2024-05-24 um 09.55.53

You can use the panel.menu option, and adapt the link for the users menu entry: panel | Kirby CMS

    'panel' => [
	    'menu' => [
		    'site',
		    'languages',
		    'system',
		    'users' => [
				'link' => 'users?role=admin'
		    ]
	    ]
    ],

Note that explained in the docs, you need to add any entry that you want to have in the menu, as they are not automatically merged.

1 Like

thank you sonja! BTW at the moment I am going for the user only approach, it feels nicer to have everything there without having to switch to a linked page or something. at some point i might have to use the programmable blueprints for users you were also helping me with a few weeks ago. lets see if i can make everything work as expected

Have you seen Bruno Meilick’s Kirby Klub plugin? It has been directed towards membership sites.

yes, thank you, i knew of it but didnt think about it for this case. we dont really need payments, me question is more content related, but i guess it might have helped a tiny bit for the user differentiation process.