Skip to content

Conversation

@najdanovicivan
Copy link
Contributor

Description

With current setup setting login or register action to empty string will trigger error. Empty values should be allowed so that it is possible to disable the action from env file.

Example in env to disable TOTP in development environment

auth.actions.login = ''

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn
Copy link
Member

michalsn commented Oct 1, 2025

I believe we're stepping back from using empty, as it's too loose.

You can replace it with $actionClass === null || $actionClass === ''

….env params

Example in env to disable TOTP in development environment

auth.actions.login = ''
@najdanovicivan
Copy link
Contributor Author

@michalsn I've updated the code to avoid using empty() function. Can we merge this one now ?

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Thank you. Rector errors are not relevant to the PR.

@michalsn michalsn requested a review from datamweb October 3, 2025 11:22
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks @najdanovicivan ,@michalsn .

@datamweb datamweb merged commit 27329f5 into codeigniter4:develop Oct 3, 2025
13 of 14 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.

3 participants