Removed my own validation source in favour of Ardent.

This commit is contained in:
James Cole
2014-07-15 17:09:59 +02:00
parent a1fb4bdb60
commit aa36e8b7cf
17 changed files with 212 additions and 163 deletions

View File

@@ -17,9 +17,9 @@ class EloquentUserRepository implements UserRepositoryInterface
$user->reset = \Str::random(32);
$user->password = \Hash::make(\Str::random(12));
if (!$user->isValid()) {
if (!$user->save()) {
\Log::error('Invalid user');
\Session::flash('error', 'Input invalid, please try again: ' . $user->validator->messages()->first());
\Session::flash('error', 'Input invalid, please try again: ' . $user->errors()->first());
return false;
}
$user->save();