mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
782e2b7fdf
commit
0f3ba9b6a8
19 changed files with 109 additions and 139 deletions
|
@ -56,17 +56,17 @@ class UserController extends AbstractController
|
|||
public function userInfo(?User $user, Packages $packages)
|
||||
{
|
||||
//If no user id was passed, then we show info about the current user
|
||||
if($user == null) {
|
||||
if($user === null) {
|
||||
$user = $this->getUser();
|
||||
} else {
|
||||
//Else we must check, if the current user is allowed to access $user
|
||||
$this->denyAccessUnlessGranted('read', $user);
|
||||
}
|
||||
|
||||
if($this->getParameter("use_gravatar")) {
|
||||
if($this->getParameter('use_gravatar')) {
|
||||
$avatar = $this->getGravatar($user->getEmail(), 200, 'identicon');
|
||||
} else {
|
||||
$avatar = $packages->getUrl("/img/default_avatar.png");
|
||||
$avatar = $packages->getUrl('/img/default_avatar.png');
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,7 +140,7 @@ class UserController extends AbstractController
|
|||
*****************************/
|
||||
|
||||
return $this->render('Users/user_settings.html.twig', [
|
||||
"settings_form" => $form->createView(),
|
||||
'settings_form' => $form->createView(),
|
||||
'pw_form' => $pw_form->createView()
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue