mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-21 09:00:07 +00:00
New stuff pertaining to the import procedure and user registration.
This commit is contained in:
@@ -14,12 +14,12 @@ class EloquentUserRepository implements UserRepositoryInterface
|
||||
$user = new \User;
|
||||
$user->email = isset($array['email']) ? $array['email'] : null;
|
||||
$user->migrated = 0;
|
||||
$user->verification = \Str::random(32);
|
||||
$user->reset = \Str::random(32);
|
||||
$user->password = \Hash::make(\Str::random(12));
|
||||
|
||||
if (!$user->isValid()) {
|
||||
\Log::error('Invalid user');
|
||||
\Session::flash('error', 'Input invalid, please try again.');
|
||||
\Session::flash('error', 'Input invalid, please try again: ' . $user->validator->messages()->first());
|
||||
return false;
|
||||
}
|
||||
$user->save();
|
||||
@@ -36,11 +36,6 @@ class EloquentUserRepository implements UserRepositoryInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
public function findByVerification($verification)
|
||||
{
|
||||
return \User::where('verification', $verification)->first();
|
||||
}
|
||||
|
||||
public function findByReset($reset)
|
||||
{
|
||||
return \User::where('reset', $reset)->first();
|
||||
|
||||
@@ -10,12 +10,11 @@ interface UserRepositoryInterface
|
||||
|
||||
public function auth($array);
|
||||
|
||||
public function findByVerification($verification);
|
||||
public function findByReset($reset);
|
||||
|
||||
public function findByEmail($email);
|
||||
|
||||
public function updatePassword(\User $user,$password);
|
||||
public function updatePassword(\User $user, $password);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user