Skip to content
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

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

christianbeeznest
Copy link
Contributor

No description provided.

@@ -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'])]
Copy link

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
Copy link

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');
Copy link

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);
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing class doc comment

Copy link

codeclimate bot commented Jun 19, 2024

Code Climate has analyzed commit 2e4ab27 and detected 12 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 8
Clarity 3
Bug Risk 1

View more on Code Climate.

@christianbeeznest christianbeeznest merged commit 52fc9ab into chamilo:master Jun 20, 2024
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant