From 62dac9b1eef31cef528ba1dd535850a22c352fb8 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 4 Jun 2015 11:19:23 +0930 Subject: [PATCH] Usernames must only contain alphanumeric chars/dashes/underscores Perhaps we can relax this a little bit, but right now these are the only characters that are parsed for @mentions anyway --- framework/core/src/Core/Models/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Core/Models/User.php b/framework/core/src/Core/Models/User.php index e29ea5fb5..131530b83 100755 --- a/framework/core/src/Core/Models/User.php +++ b/framework/core/src/Core/Models/User.php @@ -32,7 +32,7 @@ class User extends Model * @var array */ public static $rules = [ - 'username' => 'required|unique', + 'username' => 'required|alpha_dash|unique', 'email' => 'required|email|unique', 'password' => 'required', 'join_time' => 'date',