Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Userinfo.Profile.getPropertyValue in manageUser.ascx.vbUserinfo.Profile.getPropertyValue in manageUser.ascx.vb
Previous
 
Next
New Post
8/26/2008 3:07 PM
 

Dear experts,

I insert the following line in ManageUser.ascx.vb under "Sub ProfileUpdateCompleted()"

DotNetNuke.Services.Mail.Mail.SendMail(Reply-to-email@123456.com, PortalSettings.email, "", "Email Subject", user.Username + userinfo.profile.getpropertyvalue("CustomField").tostring + userinfo.profile.getpropertyvalue("City").tostring,"", "HTML", "", "", "", "")

I can receive this email and can see the username BUT NOT the CustomField value and the City value. They are empty string in the email. I am sure there is value in the CustomField and City. CustomField is a new profile field I created, while City is the come-with property field in profile. I also try to do  and it still send an empty string.

I read a lot of threads and they said "userinfo.profile.getpropertyvalue("Propertyname").tostring" can pull up any value from UserProperty table. Did I miss something ?

Pls advise.

 

 
New Post
8/26/2008 10:41 PM
 

Are you sure you are getting the profile information correctly?  Here is a post to double check...

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/248418/scope/posts/Default.aspx

 


View Brenden Kehren's profile on LinkedIn
 
New Post
8/27/2008 10:34 AM
 

HI, thanks for the reply.

I have the following lines under ProfileUpdateCompleted() in ManagerUser.ascx.vb

Dim myusers as New UserController()

Dim myuser as UserInfo = myusers.GetUser(PortalId, userId)

DotNetNuke.Services.Mail.Mail.SendMail("reply-to@12345.com", PortalSettings.email, "", "Email subject","username=" +user.Username + ", " + user.Profile.ProfileProperties.GetByName("City"),"", "HTML", "", "", "", "")

When I hit [UPDATE] in the Manage Profile page, it results as the following error and no email was sent.

A critical error has occurred.
Object reference not set to an instance of an object.

Did I miss anything?

What's the difference between GetByName and GetPropertyValue ?

Thank you in advance.

 
New Post
8/28/2008 12:17 PM
Accepted Answer 

tfs wrote
 

user.Profile.ProfileProperties.GetByName("City"),"", "HTML", "", "", "", "")

It appears you only have part of what you need for the ProfileProperty.  Try this:

 

user.Profile.ProfileProperties.GetByName("City").PropertyValue


View Brenden Kehren's profile on LinkedIn
 
New Post
9/4/2008 12:45 PM
 

Bingo. Thank you so much.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Userinfo.Profile.getPropertyValue in manageUser.ascx.vbUserinfo.Profile.getPropertyValue in manageUser.ascx.vb


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out