geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

update user email in admin error changes ALL user profile email addresses #229

Open iBeleave opened 5 months ago

iBeleave commented 5 months ago

If you don't fix this, you could lose all your user email addresses (better have a backup!) . This error occurs if you change a user email in the admin. The user id was not provided to the query, thus changes ALL instead of the specific user.

\admin\admin_text_management_class.php: ~1001 remove:

$this->db->Execute("update $this->userdata_table set email=?", [$user_info['email']]);

replace with:

$this->db->Execute("update $this->userdata_table set email=? where id=?", [$user_info['email'], $user_id]);