Skip to content

Commit

Permalink
Merge pull request #122 from vtsykun/fix/ldap-2.2
Browse files Browse the repository at this point in the history
Fix exception on view page when login via ldap
  • Loading branch information
vtsykun authored May 28, 2023
2 parents 58692d6 + c049444 commit 4b6b46e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Twig/PackagistExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ public function showApiTokenButton(UserInterface|string $token = null, bool $sho
if ($token instanceof User) {
$token = ($short ? ($token->getUserIdentifier() . ':') : '') . $token->getApiToken();
}
if ($token instanceof UserInterface) {
$token = '';
}

return $token ? '<span class="token" style="display: none" data-type="token">' . $token . '</span><button class="btn btn-primary show-token">Show token</button>' : '';
}
Expand Down

0 comments on commit 4b6b46e

Please sign in to comment.