massive improvements to tests, streamlined and synced migrations, fixed a lot of wrong or old table field references. implemented a lot of pages in react for website frontend
This commit is contained in:
@@ -56,6 +56,31 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the user by the given credentials.
|
||||
*/
|
||||
public function retrieveByCredentials(array $credentials)
|
||||
{
|
||||
if ($this->getProvider()->hasTable($this->getTable())) {
|
||||
return $this->newModelQuery()
|
||||
->where(function ($query) use ($credentials) {
|
||||
// Handle 'login' field for email or username
|
||||
if (isset($credentials['login'])) {
|
||||
$login = $credentials['login'];
|
||||
$query->where('email', $login)
|
||||
->orWhere('username', $login);
|
||||
} else {
|
||||
foreach ($this->getAuthIdentifiers() as $key => $value) {
|
||||
$query->where($key, $value);
|
||||
}
|
||||
}
|
||||
})
|
||||
->first();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function fullName(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
||||
Reference in New Issue
Block a user