Update rcube_user.php : preferences' column initialization in user_create #7692
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.