Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

What's the easiest way to prevent spaces in the user name field?

edited March 2008 in Vanilla 1.0 Help
What's the easiest way to prevent spaces in the username field?

I looked for an extension or something, and it appears there is not something available.

Comments

  • Options
    You'd have to make your own extension, something like this:<?php /* Extension Name: Space Username Check Extension Url: http://lussumo.com/community/discussion/8033/whats-the-easiest-way-to-prevent-spaces-in-the-user-name-field/#Item_0 Description: Prevents users from registering duplicate accounts with a space in the username. Version: 1.0 Author: WallPhone Author Url: http://WallPhone.com/ */ if ('people.php' == $Context->SelfUrl) { $Context->SetDefinition('NoSpacesAllowed', 'The username may not contain a space.'); Function SpaceUsernameCheck(&$UserManager) { $u = &$UserManager->DelegateParameters['User']; if (stripos($u->Name, ' ')) $UserManager->Context->WarningCollector->Add($UserManager->Context->GetDefinition('NoSpacesAllowed')); } $Context->AddToDelegate('UserManager', 'PostValidation', 'SpaceUsernameCheck'); }
  • Options
    Why would he make his own? You just made it ;)
This discussion has been closed.