•  shanker
  • 64.4% (Friendly)
  • YAF Camper Topic Starter
I changed my
IYafUserProfile.cs and YafUserProfile.cs

public string Prefix
return base["Prefix"] as string;

base["Prefix"] = value;

public string FirstName
return base["FirstName"] as string;

base["FirstName"] = value;

string Prefix { get; set; }
string FirstName { get; set; }

I have more properties...
Let me explain the problem now.
In my Database table yaf_prov_Profile has all new properties and Prefix too.
table yaf_User has only Prefix. why ??

The problem i am facing which might be cause by the above is..

In my Approve.aspx

I am calling SendRegistrationNotificationEmail

private void SendRegistrationNotificationEmail([NotNull] MembershipUser user)

// setup/save the profile
YafUserProfile userProfile = YafUserProfile.GetProfile(User.UserName);

string[] emails = this.Get<YafBoardSettings>().NotificationOnUserRegisterEmailList.Split(';'Wink;

var notifyAdmin = new YafTemplateEmail();

string subject =

notifyAdmin.TemplateParams["{adminlink}"] = YafBuildLink.GetLinkNotEscaped(ForumPages.admin_admin, true);
notifyAdmin.TemplateParams["{prefix}"] = userProfile.Prefix;
notifyAdmin.TemplateParams["{firstname}"] = userProfile.FirstName;
notifyAdmin.TemplateParams["{lastname}"] = userProfile.Lastname;
notifyAdmin.TemplateParams["{title}"] = userProfile.Title;
notifyAdmin.TemplateParams["{org}"] = userProfile.Organizaton;
notifyAdmin.TemplateParams["{phone}"] = userProfile.Phone;
notifyAdmin.TemplateParams["{email}"] = user.Email;
notifyAdmin.TemplateParams["{city}"] = userProfile.City;
notifyAdmin.TemplateParams["{state}"] = userProfile.State;
// notifyAdmin.TemplateParams["{Number}"] = userProfile.Phone;
notifyAdmin.TemplateParams["{forumname}"] = this.Get<YafBoardSettings>().Name;

string emailBody = notifyAdmin.ProcessTemplate("NOTIFICATION_ON_USER_REGISTER"Wink;

foreach (string email in emails.Where(email => email.Trim().IsSet()))
this.Get<ISendMail>().Queue(this.Get<YafBoardSettings>().ForumEmail, email.Trim(), subject, emailBody);

I am geting all the values from user object.
But for userProfile object only prefix has its value others null.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved