GetSectionMemberships(UserID) returning nothing

rated by 0 users
Answered (Verified) This post has 1 verified answer | 3 Replies | 2 Followers

PKnopf
Top 500 Contributor
51 Posts
Points 735
By: PKnopf
Posted: Mon, May 5 2008 8:16 AM

 

Dim

sm As Generic.List(Of SectionMembership) = CommunityServer.Components.SectionMemberships.GetSectionMemberships(CommunityServer.Components.CSContext.Current.UserID, False)

This does not return anything. Anbody know why? The UserID im using is active in many sections.

 
  • Post Points: 20 |

Answered (Verified) Verified Answers

Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,185
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Wed, May 7 2008 1:51 PM In reply to

CSContext.Current.UserID represents the ID of the user identified on the querystring, not the *current* user.

The current user's ID should be accessed using CSContext.Current.User.UserID.

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 20 |

All Replies

PKnopf
Top 500 Contributor
51 Posts
Points 735
By: PKnopf
Posted: Mon, May 5 2008 9:01 AM In reply to

 

Dim

sm As Generic.List(Of SectionMembership) = CommonDataProvider.Instance().GetSectionMembership(userID)

works though, why is that?

 
  • Post Points: 5 |
Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,185
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Wed, May 7 2008 1:51 PM In reply to

CSContext.Current.UserID represents the ID of the user identified on the querystring, not the *current* user.

The current user's ID should be accessed using CSContext.Current.User.UserID.

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 20 |
PKnopf
Top 500 Contributor
51 Posts
Points 735
By: PKnopf
Posted: Wed, May 7 2008 2:23 PM In reply to

 ahhh. thanks for that!

 
  • Post Points: 5 |
Page 1 of 1 (4 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com