Skip to content

Commit

Permalink
Check for unique user and email. Closes #2118
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk committed Sep 29, 2016
1 parent b40066b commit 6ce4348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
* @var string[]
*/
public $rules = [
'username' => ['required', 'regex:/\A(?!.*[:;]-\))[ -~]+\z/'],
'email' => 'required|email',
'username' => ['required', 'regex:/\A(?!.*[:;]-\))[ -~]+\z/', 'unique:users,username'],
'email' => 'required|email|unique:users,email',
'password' => 'required',
];

Expand Down

0 comments on commit 6ce4348

Please sign in to comment.