-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal: Make password edition a single independent page - refs BT#21546 #5597
Internal: Make password edition a single independent page - refs BT#21546 #5597
Conversation
@@ -69,4 +73,44 @@ public function edit(Request $request, UserRepository $userRepository, Illustrat | |||
'user' => $user, | |||
]); | |||
} | |||
|
|||
#[Route('/change-password', name: 'chamilo_core_account_change_password', methods: ['GET', 'POST'])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
@@ -69,4 +73,44 @@ | |||
'user' => $user, | |||
]); | |||
} | |||
|
|||
#[Route('/change-password', name: 'chamilo_core_account_change_password', methods: ['GET', 'POST'])] | |||
public function changePassword(Request $request, UserRepository $userRepository, CsrfTokenManagerInterface $csrfTokenManager): Response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must use "/**" style comments for a function comment
$user->setPlainPassword($newPassword); | ||
$userRepository->updateUser($user); | ||
$this->addFlash('success', 'Password changed successfully.'); | ||
return $this->redirectToRoute('chamilo_core_account_home'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing blank line before return statement
@@ -0,0 +1,43 @@ | |||
<?php | |||
|
|||
declare(strict_types=1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a single space around assignment operators
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; | ||
|
||
class ChangePasswordType extends AbstractType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing class doc comment
Code Climate has analyzed commit 2e4ab27 and detected 12 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
…ssword page - refs BT#21546
No description provided.