Username with commas - Force to use DbRoleProviders, dbMembershipProvider

Topics: Business Logic Layer, Controls
Nov 7, 2014 at 2:06 AM

I am new to blogengine. I am working with version 3.1. There is a need for our install to have usernames with , (commas) in them. By default the Microsoft calls to System.Web.Security does not support usernames with commas in them. When using the Db (with MS SQL server), commas can be used.

In the web.config the following are set:
<blogProvider defaultProvider="DbBlogProvider" fileStoreProvider="XmlBlogProvider">
<membership defaultProvider="DbMembershipProvider">
<roleManager defaultProvider="DbRoleProvider" enabled="true" cacheRolesInCookie="false">

I can get it working by changing the calls in Security.cs, UserRepository.cs, and other files to use as an example: DbRoleProvider, dbMembershipProvider. This just seems like a hack that I am doing. Is there a way to tell blogengine not to use calls like System.Web.Security.Membership.GetUser but to use instead the DbMembershipProvider.GetUser method instead.


Nov 8, 2014 at 1:24 AM
Edited Nov 8, 2014 at 1:28 AM
We need usernames with Commas. Why do we need Commas? Because we need our blog posts to contain author credentials, such as:
by Dr. John Smith, Ph.D.

We have many masters and PhD users who want to write for us, and it is not very professional to have a medical doctor author a blog article on physical fitness and not take advantage of displaying his author credentials.

I wish there was a way not to "bind" usernames to display names.. Or am I missing something? Is there anyway I can have a display name for a post show up different than a username? If usernames are always forced to be display names, then we definitely need some way to allow commas to be in usernames. Maybe this can be a suggestion for a new feature, or what is an easy, quick way to accomplish this? Love by the way.
Nov 8, 2014 at 4:46 AM
You can use profile fields instead, seems a lot easier. You can use "display name" or add custom field like "title". Then modify your theme to use profile for author name in the post.