lonnieezell / Bonfire2

CodeIgniter 4-based application skeleton
MIT License
129 stars 50 forks source link

Fix for limiting logins list length #346

Closed dgvirtual closed 4 months ago

dgvirtual commented 1 year ago

(Codeigniter Model does not implement limit() metod

lonnieezell commented 1 year ago

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 commented 1 year ago

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).

dgvirtual commented 7 months ago

@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)

kenjis commented 6 months ago

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

dgvirtual commented 6 months ago

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

dgvirtual commented 6 months ago

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

dgvirtual commented 4 months ago

@lonnieezell , let's finish this trivial change.