Hi All!
There is an issue when im trying to update an admin user with a new password running on php 8.1.4.
Im getting this message: "The username that you submitted is not available".
On php 8.0.2 everything works fine.
Does anyone tried out or is only for me?
Change Admin password issue running on php 8.1.4.
3 years ago
3 years ago
#1
3 years ago
#2
Hi framex,
I assume you mean the default admin user account or a user with an admin level for the Trongate framework?
I assume you mean the default admin user account or a user with an admin level for the Trongate framework?
3 years ago
#3
Nop! On every admin user.
So the resume with php 8.1.4 or 8.2.1
1)Adding new admin user works fine
2)Update with new password getting -> The username that you submitted is not available.
3) Deleting an existing admin user getting a blank page.
I tried both Live and Dev env and i have the same php extensions enabled as 8.0.17 that works fine.
So the resume with php 8.1.4 or 8.2.1
1)Adding new admin user works fine
2)Update with new password getting -> The username that you submitted is not available.
3) Deleting an existing admin user getting a blank page.
I tried both Live and Dev env and i have the same php extensions enabled as 8.0.17 that works fine.
3 years ago
#4
Ahh yeah! I found the problem - The comparison using strict equality (!==) on line 321 in 'Trongate_administrators.php' of the validation callback_username_check.
In PHP 8.1+, the strict equality operator (!==) may behave differently with certain types of operands, such as comparing a string to a numeric string. This is causing issues with the comparison $update_id !== $register_id when you change your password.
The fix is to ensure the $update_id is read as an integer from the URL, so add (int) at line 312
I couldn't replicate the delete problem you are experiencing - maybe do some debugging on your system with the 'submit_delete()' method in 'Trongate_administrators.php'
In PHP 8.1+, the strict equality operator (!==) may behave differently with certain types of operands, such as comparing a string to a numeric string. This is causing issues with the comparison $update_id !== $register_id when you change your password.
The fix is to ensure the $update_id is read as an integer from the URL, so add (int) at line 312
I couldn't replicate the delete problem you are experiencing - maybe do some debugging on your system with the 'submit_delete()' method in 'Trongate_administrators.php'
3 years ago
#5
Yep that worked ;)
Thanks a lot Dafa
Thanks a lot Dafa