I think you can achieve this goal in a similar manner..
NOTE I have not tested this procedure, you do at your own risk, make a backup of your data first
a) the script could be almost the same.. but as I can see in horde_prefs table on SME, pref_uid in in the form of
username@localdomain, so you have to modify the script itself accordingly (and users.txt too)..
ah, remove also line
echo COMMIT;
b) on SME console do:
mysql
use horde;
source path_to_applypref.sql;
quit;
it
should work
Ciao
Stefano