Skip to content

Commit 2fdc86d

Browse files
committed
minor #10110 Undefined variable $userName in example (Trekels)
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes #10110). Discussion ---------- 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()`. Commits ------- e6d500f Undefined variable $userName in example
2 parents 24816e5 + e6d500f commit 2fdc86d

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)