mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-27171 messages: implement new syntax in messages.php and update processing
The new messaging default settings can be set in messages.php and deployed during installation. This also ensures the removing of settings on plugin uninstallation and contains the update script to populate current default settings on the existing system when the new feature is introduced. For security reason we have to avoid using library functions in upgrade function, so we set defaults the blind way. At this point we do not expect plugins to have individual messaging defaults presets anyway. The site defaults are the same as were set for each user using message_set_default_message_preferences function. Signed-off-by: Ruslan Kabalin <ruslan.kabalin@luns.net.uk>
This commit is contained in:
parent
3bcbd80ebe
commit
7a04c476a2
11 changed files with 201 additions and 60 deletions
|
@ -200,10 +200,6 @@ if ($usernew = $userform->get_data()) {
|
|||
|
||||
// trigger events
|
||||
if ($usercreated) {
|
||||
//set default message preferences
|
||||
if (!message_set_default_message_preferences( $usernew )){
|
||||
print_error('cannotsavemessageprefs', 'message');
|
||||
}
|
||||
events_trigger('user_created', $usernew);
|
||||
} else {
|
||||
events_trigger('user_updated', $usernew);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue