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

User: Add TOTP 2FA authentication - refs #4431 #5836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianbeeznest
Copy link
Contributor

No description provided.


$qrCodeBase64 = base64_encode($qrCodeResult->getString());

return $this->render('@ChamiloCore/Account/change_password.html.twig', [
Copy link

Choose a reason for hiding this comment

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

Add a comma after each item in a multi-line array

return $decryptedSecret;
} catch (\Exception $e) {
error_log("Exception caught during decryption: " . $e->getMessage());
return '';
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

@@ -705,6 +705,21 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso
#[ORM\OneToMany(mappedBy: 'user', targetEntity: SocialPostFeedback::class, orphanRemoval: true)]
private Collection $socialPostsFeedbacks;

#[ORM\Column(name: 'mfa_enabled', type: 'boolean', options: ['default' => false])]
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.

@@ -705,6 +705,21 @@
#[ORM\OneToMany(mappedBy: 'user', targetEntity: SocialPostFeedback::class, orphanRemoval: true)]
private Collection $socialPostsFeedbacks;

#[ORM\Column(name: 'mfa_enabled', type: 'boolean', options: ['default' => false])]
protected bool $mfaEnabled = false;
Copy link

Choose a reason for hiding this comment

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

Line indented incorrectly; expected 8 spaces, found 4

#[ORM\Column(name: 'mfa_enabled', type: 'boolean', options: ['default' => false])]
protected bool $mfaEnabled = false;

#[ORM\Column(name: 'mfa_service', type: 'string', length: 255, nullable: true)]
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.

Copy link

codeclimate bot commented Oct 2, 2024

Code Climate has analyzed commit ae664de and detected 59 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 53
Complexity 1
Clarity 2
Bug Risk 3

View more on Code Climate.

@ywarnier
Copy link
Member

Lang vars:

  • 'Enter TOTP code' (v)
  • 'Submit TOTP' (v)
  • '2FA disabled successfully.'
  • 'Enable Two-Factor Authentication (2FA)'
  • 'Update Settings'
  • 'Scan the QR Code to enable 2FA'

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.

2 participants