Retrieve User by their GUID

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/18/2010 11:35:12 AM
Gravatar
Total Posts 20

Retrieve User by their GUID

I'm currently working on the affiliate portion of a module and I can't seem to figure out how to get a user's information based on their GUID without them being logged into the site.

Thanks in Advance

Desirea

3/18/2010 11:43:26 AM
Gravatar
Total Posts 20

Re: Retrieve User by their GUID

Nevermind.. I figured it out now.

SiteUser affiliate = new SiteUser(siteSettings,new Guid(affiliateGuid));
 

Sighs.. thank god it's almost friday.

Des

4/1/2010 4:37:00 AM
Gravatar
Total Posts 5

Re: Retrieve User by their GUID

I have 1 question related to user's GUID also. I dont understand why User table has both UserID(int, primary key) and UserGuid(guid), it seems other tables just have Guid as their keys. Can someone help explain it?

thanks.

4/1/2010 9:36:36 AM
Gravatar
Total Posts 18439

Re: Retrieve User by their GUID

Hi,

All of the important tables that are used in joins have integer ids for best performance. However also having a unique guid on each row provides some advantages.

First is allows for lose coupling of data, so for example we have a Content Rating System where any feature can store ratings and retrieve their ratings by the feature specific item guids. So we could even use this for user ratings if we want to store them by userguid. Currently we use it for Html content, Blog posts and products in WebStore.

Another benefit is for example if one wanted to join the data of 2 sites into a single db, the content could be imported but the rows would get new integer ids, however since we also have the guids it would be possible to re-create the relationships of the new interger ids by using the guids in queries to update the integers.

Hope it helps,

Joe

4/2/2010 12:38:40 AM
Gravatar
Total Posts 5

Re: Retrieve User by their GUID

Thanks Joe !!!

You must sign in to post in the forums. This thread is closed to new posts.