How can I have Usernames with apostrophes?

Hi.  My name is D'Ann and I want to be able to have my real name as my user name on my site.  But it doesn't allow  apostrophes. Is there a way to change that.  I'd hate to have to spell my own name wrong.

Quote · 27 Feb 2011

anyone know?

Quote · 1 Mar 2011

It can't be done easily, but here's your options for going about something like this:

  1. Edit the script to display first, last, or full names instead of usernames
  2. Create a new profile field for a display name, and edit the script to display it instead of usernames
  3. Edit the allowed characters for the username profile field and then make numerous changes to the script in order to function properly with these characters (this hasn't been extensively tested, so it's unknown as to what extra characters will work and what characters will not)

If you're really interested, you should create a post in the jobs section.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 1 Mar 2011

Yes…you can do this quite easily. First…you need to go into the Admin portion of your site.

Next, go to Builders….Profile Fields…..and click on the block Nickname. Then…click on Advanced….once you are there…you will see this...

 

return ( preg_match( '/^[a-zA-Z0-9 ]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

 

You need to replace the [a-zA-Z0-9 ] with [a-zA-Z0-9\'\s ] followed by the +$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

Then…clear your cache and test.

 

Let me know how it works out for ya.

Jeremy
Quote · 1 Mar 2011

 

Yes…you can do this quite easily. First…you need to go into the Admin portion of your site.

Next, go to Builders….Profile Fields…..and click on the block Nickname. Then…click on Advanced….once you are there…you will see this...

 

return ( preg_match( '/^[a-zA-Z0-9 ]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

 

You need to replace the [a-zA-Z0-9 ] with [a-zA-Z0-9\'\s ] followed by the +$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

Then…clear your cache and test.

 

Let me know how it works out for ya.

Have you extensively tested this?

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 1 Mar 2011

It's live on my site and has been since I joined in January…not having any issues as of yet.

Jeremy
Quote · 1 Mar 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.