Skip to content
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

Update rcube_user.php : preferences' column initialization in user_create #7692

Merged
merged 1 commit into from
Nov 21, 2020

Conversation

jbel1
Copy link
Contributor

@jbel1 jbel1 commented Oct 23, 2020

I am working on an update of the squirrelmail_usercopy plugin,
to permit the transfer of address groups and the equivalent of the
roundcube's "message_highlight" plugin when creating à new user on
roundcube with data taken from a current squirrelmail account.
Many of our squirrelmail users use these features.

If the addition of address groups has been done updating only the
original plugin's code, I had to make some change in the "create"
function in the program/lib/Roundcube/rcube_user.php file to permit the
import of the message highlight preferences.

This change is simply the addition of the field 'preferences' for the
call of the "user_create" hook, and the storage of the returned value in the
"preferences" column of the "users" table of the database.

The change has to be made because if the user_create hook permits to
populate all columns of the "users" table, the "preferences" column is
not treated by the hook, while the "messages highlight" plugin stores its
preferences there.

Adding the change as I suggest could be seen only as a measure of
consistency about the initialization of the "users" table.
When I searched in the code to understand why my updated plugin didn't
work, I was surprised to see that the "preferences" field was simply not
treated...

And even beyond the squirrelmail_usercopy plugin, I think this change
could help others user-creation related plugins.

@alecpl alecpl added this to the 1.5-beta milestone Oct 23, 2020
@alecpl alecpl merged commit 8ad7342 into roundcube:master Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants