Username Authentication for SilverStripe Websites - Burnbright Websites

Username Authentication for SilverStripe Websites

Posted by Jeremy Shipman on 5 January 2010 | 2 Comments

Tags: ,

This set of instructions and code will help you to set up username authentication for your SilverStripe website. Note that the SilverStripe CMS has typically relied on E-Mail authentication, so this could cause problems if developers have assumed email authentication. I've provided a patch and information for issues I've found so far.

Use this code at your own risk. Please let me know if you find any bugs with the code, or the instructions are not clear.

Download & install my auth_username module

In your _config.php optionally add:

// makes username authentication default
Authenticator::set_default_authenticator("UsernameAuthenticator");

// removes default email + password authentication
Authenticator::unregister("MemberAuthenticator");

To generate usernames for your users, I've provided a function on the member decorator class 'UsernameMemberDecorator' that generates a username from the user's first name and surname.

Known issues:

  • Can't change default admin member's details properly.

Post your comment

Comments

  • The module allows the member's 'username' to be the unique identifier. Sometimes you want to allow members to have the same email address. This module gets around that issue.

    Posted by Jeremy, 07/05/2010 6:06pm (3 months ago)

  • Not sure what this module does. Does this allow a person to register to the system or hidden page?

    Posted by Steve, 13/02/2010 5:41am (6 months ago)