Skip to content

Commit e6d500f

Browse files
Trekelsjaviereguiluz
authored andcommitted
Undefined variable $userName in example
The $username variable in the `WebServiceUserProvider` example is not set, since the user object must implement the `UserInterface` (according to best practice) we can set the variable by calling `$user->getUsername()`.
1 parent 24816e5 commit e6d500f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

security/custom_provider.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ Here's an example of how this might look::
144144
);
145145
}
146146

147+
$username = $user->getUsername();
148+
147149
return $this->fetchUser($username);
148150
}
149151

0 commit comments

Comments
 (0)