MDL-22232 messaging: miscelaneous fixes after integration review

This commit is contained in:
Andrew Davis (andyjdavis)
2011-08-26 15:59:31 +08:00
parent bec1c29d84
commit 87a4bba39c
3 changed files with 12 additions and 8 deletions
+1 -6
View File
@@ -100,12 +100,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
//only update the user's "emailstop" if its actually changed
if ( $user->emailstop != $disableall ) {
$user->emailstop = $disableall;
//create a new user object just in case any other changes have been
//made to the user object that we don't want to save
$usertoupdate = new stdClass();
$usertoupdate->id = $user->id;
$usertoupdate->emailstop = $user->emailstop;
$DB->update_record('user', $usertoupdate);
$DB->set_field('user', 'emailstop', $user->emailstop, array("id"=>$user->id));
}
$preferences = array();