home
products
community
company
buy now
Register
Login
Community
»
Forums
Forums
Downloads
Help Desk
Knowledge Base
Purchases
Account
Unanswered
Active Topics
Forums
Search
Forums
>
Active Profile - formerly MyProfile from DNNFusion
>
Community Support
How to get Users ProfileImageID?
Last Post 20 Jun 2008 08:20 AM by Brokit. 0 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Brokit
Customers
Posts:3
20 Jun 2008 08:20 AM
I need to retrieve a users profile image but it somehow doesn´t work the way I intended. Could you advise a good way to get a users profile image?
Here is my code:
var user = GetLoggedInUser(); // Gets a valid DNN User
var imageID = new Guid();
if (user.UserID == -1)
return imageID;
var uProfileController = new UserProfileController();
var uProfile = uProfileController.GetUserProfile(user.PortalID, user.UserID);
var myProfileController = new MyProfileController();
var myProfile = myProfileController.GetMyProfileByUserProfileId(uProfile.UserProfileId);
imageID = myProfile.ProfileImageId;
Although the user has a profile it will throw a null reference. Is there a safe way to build the UserProfileImageURL?
Thanks!
You are not authorized to post a reply.
Active Modules, Inc. General Forums
--General Questions and Comments
--Latest News
--Comments, Complaints & Suggestions
--Active Compare Frequently Asked Questions
Active Forums
--General Discussion
--Community Support
--Support Frequently Asked Questions
--Sales Frequently Asked Questions
Active Profile - formerly MyProfile from DNNFusion
--General Discussion
--Community Support
--Feature Requests or Suggestions
--Sales Frequently Asked Questions
--Support Frequently Asked Questions
Active Messaging - formerly MyMessages
--General Discussion
--Community Support
--Feature Requests or Suggestions
--Sales Frequently Asked Questions
--Support Frequently Asked Questions
Active Purchase
--General Discussion
--Community Support
--Themes, Templates and Language Packs
--Sales Frequently Asked questions
--Support Frequently Asked Questions
Active Cases
Active CRM
Active Blogs
--Will's Blog
--Active Update
--Tech Tips
Content
--Testimonials
--Announcements
--Featured Customers
Forums
>
Active Profile - formerly MyProfile from DNNFusion
>
Community Support
Active Forums 4.1