Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Personal User Infos / pages

Started by Jan Paulsen 6 years ago · 3 replies · 610 views
6 years ago

Hi ,
for a site for a club I set up some private pages that are only available for logged-in users.

Now I want to extend the user profile with further Information, that the users can give during registration or editing their profile.

I wonder where these data should be stored. First approach is to extend the login.yaml, profile.md and register.md with some extra fields.
But I am not sure, wether this would be the right way as I want to make these Infomations available for other users.
e.g. the user adds some informations about his sailing boat (it is a sailing club) and i want to show a table where I list all boat informations of all users.

  1. Will these information be accessable within my twigs?
  2. would it be possible to add some pictures to the profile?

since the account is just one <username>.yaml file and also includes some private data, my first idea does not seem to be a recommended way to solve this.

What would be the best way?

Thank you for any hints
regards
odde

6 years ago

mnh....
perhaps i failed to explain what i am looking for.

i want to create a list of the boats our members own - with some Infos the member give optionally.
Since the member should be able to maintain his infos on his own, i thought about extending the <username>.yaml
I found out how to do this using the login-plugin.

but i don't know how to access these fields from within my twig-files.
This would work for me as a first approach.

for the future it might happen, that i all so have to store further files per member.
so - if there is a solution for something like home directories for users, it might be better to skip the step with the extended <username>.yaml.

6 years ago

To use data from users account files you could use the Snitch Plugin.

Another approach is to let each member create and maintain their own "Me and my boat(s)"-page. For that you may find some of my other Grav Plugins helpful.

6 years ago

thank you for the link!

For now i expanded the users-profiles fieldlist and let them edit the infos, they want to be mentioned.
On submitting the form a mail will be send to me in cc with all fields - i still have to copy those to the boat's page (won't be too many ;-))
I will have a closer look to your plugin, as soon as my schedules allows.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 76 7 hours ago
General · by pamtbaau, 13 hours ago
1 47 12 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago