Fixed some loading problems with loaded user and ajusted the Email allowed length (to 255)
This commit is contained in:
parent
374b056754
commit
267fe5cadd
|
@ -22,7 +22,7 @@ class User {
|
|||
public ? string $lastName;
|
||||
|
||||
/**
|
||||
* @Field("size" => 150)
|
||||
* @Field("size" => 255)
|
||||
*/
|
||||
public string $email;
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ class Authenticate {
|
|||
|
||||
public function rememberMe(\Ulmus\Repository $repository) : ? User
|
||||
{
|
||||
$logUser = function(int $id) use ($repository) {
|
||||
if ( null === ( $user = $repository->loadFromPk($id) ) ) {
|
||||
$logUser = function(? int $id) use ($repository) {
|
||||
if ( $id === null || null === ( $user = $repository->loadFromPk($id) ) ) {
|
||||
throw new \Exception("User not found.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue