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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...How to handle auditing for particular user profile properties in DNN 7?How to handle auditing for particular user profile properties in DNN 7?
Previous
 
Next
New Post
4/29/2015 9:55 AM
 

I've not modified anything and the property value, created and modified datetime is populated by DNN. Even CreatedOnDate property returns the default value of DateTime. 

Is there any other alternative solution in DNN should I go for to retrieve it? Or do I just query it by creating my own stored procedure?

 
New Post
4/29/2015 11:45 AM
 
Sebastian Leupold wrote:
Siddharth Pandey wrote:

Hi Sebastian, 

Thanks for pointing out the built-in property level auditing in UserProfile table.

I access this using: 

ModuleContext.PortalSettings.UserInfo.Profile.ProfileProperties.GetByName("FirstName").LastModifiedOnDate

In return what I see is the default datetime value that is "1/1/0001 12:00:00 AM". Although I can see the actual correct value in the database. I use the above statement in my custom module that inherits "ModuleUserControlBase". 

Is this something you told me already that it may not check whether a value has changed ? when you mentioned: " the Users module might not check, whether a value has changed, when hitting update, i.e. updating each property."

Is there any other way to access the last updated datetime information? Or do I just need to just query the table manually with where clause including portal id, user id, etc. ?

GetUserProfile retrieves property values with lastModifiedOnDate and lastModifiedByUser from UserProfile table in the database. If the value is properly stored but you are getting a null date, there must be an issue in DNN API.

I've tried using "GetUserProfile" with the statement below but the result is I get an object of type UserProfile with all property set to empty string, however, I can see property values like First/last name, postal code, dob etc. in the database by executing the same procedure and user id as 1 which is the super user account.

var result = CBO.FillObject(DataProvider.Instance().ExecuteReader("GetUserProfile", ModuleContext.PortalSettings.UserId));
 
New Post
4/29/2015 6:06 PM
 
if you check the table userprofile in the database, is it populated with proper values?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/30/2015 12:06 AM
 

Hi, yes I can see the proper values in SSMS. DNN also updates it when I save those specific fields from Edit Profile page. But for some reason, it retrieves the default values when I access it via the code in my previous posts.

 
New Post
4/30/2015 3:41 AM
 
this sounds like a bug, please Report at http://support.dnnsoftware.com to get it fixed in a subsequent version.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...How to handle auditing for particular user profile properties in DNN 7?How to handle auditing for particular user profile properties in DNN 7?


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