Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:1 to 3 of 3
<?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');
}
1 to 3 of 3