I want to prevent users from registering using usernames that contain special characters such as '-'. How can i prevent this?
Hello, Here is code that allow to use only numbers and latters within username. You need to put this code snippet to site.php file: http://www.amember.com/docs/Site.php_file PHP: Am_Di::getInstance()->hook->add(Am_Event::GET_LOGIN_REGEX, function (Am_Event $e) { $e->setReturn('/^[0-9a-zA-Z]+$/');}); Also you need to change error message 'Username contains invalid characters - please use digits, letters, dash and underscore' accordingly. You can do it either at: aMember CP -> Utilities -> Edit Messages or within form configuration (click labels on username block) aMember CP -> Configuration -> Forms Editor Best Regards.