Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Userinfo.Profile.getPropertyValue in manageUser.ascx.vb
Previous Previous
 
Next Next
New Post 8/26/2008 1:07 PM
Resolved
User is offline tfs
25 posts
10th Ranked


Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

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 8:41 PM
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

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

 

 
New Post 8/27/2008 8:34 AM
User is offline tfs
25 posts
10th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

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 10:17 AM
Accepted Answer 
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 
Modified By b471code3  on 8/28/2008 12:18:13 PM)

 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

 
New Post 9/4/2008 10:45 AM
User is offline tfs
25 posts
10th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

Bingo. Thank you so much.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Userinfo.Profile.getPropertyValue in manageUser.ascx.vb
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com
Alki Homes - Seattle, WA
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP