1
0
mirror of https://github.com/flarum/core.git synced 2025-10-26 21:21:28 +01:00

Very rough implementation of forgot password

This commit is contained in:
Toby Zerner
2015-05-26 11:14:06 +09:30
parent d481a38029
commit feb4676aa0
18 changed files with 376 additions and 3 deletions

View File

@@ -45,6 +45,17 @@ class EloquentUserRepository implements UserRepositoryInterface
return User::where($field, $identification)->first();
}
/**
* Find a user by email.
*
* @param string $email
* @return \Flarum\Core\Models\User|null
*/
public function findByEmail($email)
{
return User::where('email', $email)->first();
}
/**
* Get the ID of a user with the given username.
*

View File

@@ -31,6 +31,14 @@ interface UserRepositoryInterface
*/
public function findByIdentification($identification);
/**
* Find a user by email.
*
* @param string $email
* @return \Flarum\Core\Models\User|null
*/
public function findByEmail($email);
/**
* Get the ID of a user with the given username.
*