Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > User | Membership | Profile - Best Approach View modes: 
User avatar
Member
Member
blakeley.sam-gmail - 8/3/2012 1:37:39 PM
   
User | Membership | Profile - Best Approach
Hi there,

I have recently taken the 3 day developer course... but am still new to Kentico.

I'm developing a website for photographers who pay for membership. They are able to edit a public profile and upload images.

So my logic is to create a "photographer" document type and a "photographer_image" document type. But I'm wondering how I link this their user profile? I want to be able to use their username as their public URL but is this based on the "user profile" or their photographer document type? Would I have to create their photographer profile when they register (meaning add custom code?). Or am I going down the wrong path? Should I be looking into editing their profile? How do I link the two by user_id?

Any help or guidance would be greatly appreciated.

Thank you.
Sam.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/6/2012 6:06:59 PM
   
RE:User | Membership | Profile - Best Approach
You can either add a UserID field to the photographer document type or a PhotographerID to the UserSettings System Table in the System Tables development section.

Look at Kentico alternative forms for some forms to edit their profile.

If this is something where you won't have a huge number of registrants, then you can manually create the photographer document when a photographer registers and set the ID on the User account manually.

Otherwise, you may need to get a little deeper into the code and create a custom registration web part that will create the photographer document and associate it with the user when they register. It might actually be easier to add that code to the login control because it is a much simpler control to edit. In your code you can check if a user has a photographer associated with him when he authenticates, and create one if not.



Alternatively, you can forgo the photographer document type and just add the fields that you had planned to add to it to the UserSettings table. Then use the user contributions web parts to allow them to add photos and things.

I hope this is enough info to steer you in the right direction.


User avatar
Member
Member
blakeley.sam-gmail - 8/7/2012 1:46:31 PM
   
RE:User | Membership | Profile - Best Approach
Thank you so much for your reply!

I'm thinking I will have to "get a little deeper into the code" to add the details as we are hoping for several thousand registrants. Doing a check on the login makes perfect sense - it's the type of answer I was looking for. I will definitely look into the User Settings table and the alternate forms.

I see that you're a certified developer - what company do you work for? Have you ever consulted/work in collaboration?

Thanks
Sam Blakeley
blakeley.sam@gmail.com