codeigniter4 / shield

Authentication and Authorization for CodeIgniter 4
https://shield.codeigniter.com
MIT License
351 stars 123 forks source link

Bug: Prevent custom user entitiy on some usermodel method #1103

Closed MrFrost-Nv27 closed 2 months ago

MrFrost-Nv27 commented 3 months ago

PHP Version

8.2.1

CodeIgniter4 Version

4.5.1

Shield Version

1.0.3

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MySQL

Did you customize Shield?

Yes, i change some small code on UserModel in returning hardcoded User Entity's Class instead declared return type

What happened?

If we use findByCredentials method on UserModel with email, return Hardcoded User Entity class instead declared return type

Steps to Reproduce

Some case is in login step, if we use email is returning hardcoded User entity class instead declared return type before saved to the session

Expected Output

we want if we use custom user entity class in our custom model is used on every UserModel Logic

Anything else?

No response