-
Notifications
You must be signed in to change notification settings - Fork 132
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
Bug: Error Occurred While Changing User Password: strtolower(): Argument #1 ($string) must be of type string, null given in NothingPersonalValidator #1171
Comments
Can you show the complete code? it looks like the email is missing or it could be that you create username only as your login credentials instead of using email. |
Hey @arashsaffari , In Shield, all users are required to have a unique email address, which is mandatory during the registration process. However, it's possible to log in using other identifiers besides email, such as a username, employee ID, etc. Considering this, it seems that the user you're trying to change the password for does not have an email address associated with their account. Please verify that the user has an email by running the following command: php spark db:table auth_identities Ensure that the user has a valid email (field secret). If the user does have an email and the problem persists, please provide the minimal code necessary to reproduce the error. |
I have an email address stored in the database. The problem is that when using |
Can you show the code how you call the user data? if you call it correctly then the email displays well. For example: $usersModel = auth()->getProvider();
//find user where id is "7"
$user = $usersModel->find(7);
//show user email
dd($user->email); // result "example@pointerpointer.com" |
It appears that you have written incorrect code regarding |
I can reproduce a similar error. in my case, I added a personal field to |
In my case, it’s specifically related to |
We did not receive the minimum code required to reproduce the issue. This issue is now closed. |
PHP Version
8.3.10
CodeIgniter4 Version
4.5.4
Shield Version
1.1.0
Which operating systems have you tested for this bug?
macOS
Which server did you use?
apache
Database
MySQL 8
Did you customize Shield?
Yes, but I believe my changes have nothing to do with the error.
What happened?
When changing a user's password, I encounter the following error:
This error is caused by the NothingPersonalValidator.
Steps to Reproduce
Expected Output
Anything else?
No response
The text was updated successfully, but these errors were encountered: