Description
When new user accounts are created, all of the checkbox options are cleared. It seems like the desired behavior would be for the checkbox state to inherit the system default values. The end result of the current behavior is that if a user creates an account and hits Save without specifying any additional options they will lose default features like the icon bar, fancy links, etc.
Example
Create a new user account on this wiki and examine the checkbox values - they will all be unchecked.
Details
This Wiki.
It looks like this problem can be fixed with the following change to userform.py:
165,172c165,175 < for key, label in user.User._checkbox_fields: < value = form.get(key, [0])[0] < try: < value = int(value) < except ValueError: < pass < else: < setattr(theuser, key, value) --- > # preserve system defaults for new user accounts, don't grab > # anything from the form > if not newuser: > for key, label in user.User._checkbox_fields: > value = form.get(key, [0])[0] > try: > value = int(value) > except ValueError: > pass > else: > setattr(theuser, key, value)
Discussion
Thanks for the patch!
Plan
- Priority:
Assigned to: ThomasWaldmann
- Status: fixed in 1.2.3 1.3