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]: Users can opt-in to userclasses but cannot opt-out of them. #5159
Comments
I'm not able to reproduce your issue using the steps that you provided. See the video below for what I did: 2023-12-20.18-30-32.webmWhat did you do differently from what I did to make the user unable to unassign a userclass that they have permission to unassign? |
I think the only thing I did different was name the database info something other then "e107". I am currently investigating what other differences there could be in the environment I've installed it on compared to everyone else's. Are you also running PHP 8.2.13? What OS is your server using? There is a discussion regarding this issue here: #5162 |
2023-12-21.14-44-40.mp4Here is what I did. @Deltik |
I was able to reproduce the bug as a normal user (not admin) by unchecking all the "Subscribed to" items. The cause is that the As for the "Manager" and "Visibility" changing from "Everyone (public)" to "Admin" in So there are two bugs. |
I'm impressed you found this out that fast. You may have just saved my website. :) |
I have discovered while debugging that the userclass string seems to get wiped out by the validation process whenever you submit the form and only the ID of the newly toggled userclass remains. I have 3 visible userclass checkboxes: Administrator, Moderator, and a Custom Class I created with the ID# 2. |
I came across this issue a while ago. I added a bit of code to
|
What e107 version are you using?
v2.3.3
Bug description
Once a user has assigned themselves any custom userclass on the settings page, they cannot unassign it. In the database, I have noticed in the "e107_user" table that the "user_class" column is completely overwritten with the id of the userclass instead of it being appended to it. This happens on my current production install and a fresh test install.
How to reproduce
Expected behavior
Users should be able to unassign a userclass from their account.
What browser(s) are you seeing the problem on?
Firefox, Chrome / Brave
PHP Version
PHP 8.2.13
The text was updated successfully, but these errors were encountered: