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

Fix for limiting logins list length #346

Merged
merged 1 commit into from
May 19, 2024

Conversation

dgvirtual
Copy link
Contributor

(Codeigniter Model does not implement limit() metod

@lonnieezell
Copy link
Owner

The Model class doesn't directly, but it can use most of the functions from the query builder chained like that. Were you running into an actual error with this?

@dgvirtual
Copy link
Contributor Author

The Model class doesn't directly, but it can use most of the functions from the query builder chained like that. Were you running into an actual error with this?

Using limit() does not produce an error, but it does not work either, it has no effect (on CI 4.3.3, php 7.4).

(Codeigniter Model does not accept limit() metod
@dgvirtual
Copy link
Contributor Author

@lonnieezell, I did a rebase for this PR, so now it passes tests. Please consider it as well. It is only minor improvement, but does limit the otherwise endless list of recent logins (https://www.codeigniter.com/user_guide/models/model.html#findall)

Copy link
Owner

@lonnieezell lonnieezell left a comment

Choose a reason for hiding this comment

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

Good call. Thanks!

@kenjis
Copy link
Contributor

kenjis commented Feb 24, 2024

Oh, the the query builder limit(20) is overwritten by $limit of findAll()!

@dgvirtual
Copy link
Contributor Author

Explains why limit() neither fails nor has any effect...

@dgvirtual
Copy link
Contributor Author

dgvirtual commented Mar 11, 2024

If all is fine, could someone merge this into develop please? @lonnieezell ?

@dgvirtual
Copy link
Contributor Author

@lonnieezell , let's finish this trivial change.

@lonnieezell lonnieezell merged commit b892532 into lonnieezell:develop May 19, 2024
10 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