• tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
10 years ago

I can see my Label value.. the textbox comes with out corresponding Label.

you added a new localized label control do you also add the tag to the language files?
  • shanker
  • 64.4% (Friendly)
  • YAF Camper
10 years ago
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().NotificationOnUserRegisterEmailList.Split(';');

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().Name;

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

foreach (string email in emails.Where(email => email.Trim().IsSet()))
this.Get().Queue(this.Get().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.
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
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