Username Authentication for SilverStripe Websites

Posted by Jeremy Shipman on 5 January 2010 | 0 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

No one has commented on this page yet.