0
votes

I am pretty new to meteor and I am trying to make my first app which should have a profile page, later also with picture upload depending on user group.

As I understand I do not need a extra collection and subscription. I am using useraccounts:bootstrap package with accounts-password. I added some custom fields to the profile (firstName, lastName, country).

Now I want to create a update or edit page. I could not find any resources which could been helpful. Do I need to write all the logic for example testing the email address by my self? Or is this included by the package.

Or is it better to create a new collection for users with meteor-collection2?

Thanks Witali

1

1 Answers

0
votes

Collection2 will just attach its schema to the original user collection (if you proceed like suggested in collection2 readme).

As far as I know, I'm afraid that you will have to create some publications. Since editing user should be considered as "must-be secure", I would advise you to take a look at the existing packages. I'm quite a newbie to so I didn't look into the code of alanning roles package (which is, I've been told, excellent). I used https://github.com/perak/user-roles. I think the code is good and clear.

The same guy, perak, made a meteor code generator which is still a work in progress, but looks very promising to me. Get one of his examples with user account and look at the client folder. You will have, when considering his user-roles package, all the code to do what you want.

ps: for email testing, look at his files in the client/lib folder but it is just a regex