Thanks guys!
You both helped me a lot - actually I had some troubles with grabbing the "right" ProfilePropertiesCollection.
I was just hoping to get it from the User class from the base class (portalmodulebase) but that just seems to be empty in terms of values.
The thing is though that the PorperyNames are there only the values are missing. So the solution was to use the GetCurrentUserInfo() method in the UserController class. Thanks for that hint!
I realized that (as you have mentioned apk2006) it will cause a module exception if I try to get the Properties of an anoymous (aka not logged in) user. So I decided to check the UserID and that kinda works like expected. My only problem now seems to be caching related because once I have been on my page with the module on it the displayed info will not change even if I log in or log out then. So only the first visit will set the data and then it will just be the same.
As said, I am assuming that this behavious is caching related so if anyone has some clues - go ahead
So here is my code to those of you who are interested:
string result = "";
ProfilePropertyDefinitionCollection m_objProperties;
DotNetNuke.Entities.Users.UserInfo curUser = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();
if (curUser.UserID >=0)
{
m_objProperties = curUser.Profile.ProfileProperties;
result = m_objProperties.GetByName("myCustomProperty").PropertyValue;
}
return result;