Skip to content

Commit

Permalink
MDL-24918 backup - fix setting use leading to wrong security check error
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 28, 2010
1 parent 5d31799 commit 9af849f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup/util/checks/backup_check.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ public static function check_security($backup_controller, $apply) {
// Now, enforce 'moodle/backup:anonymise' to 'anonymise' setting, applying changes if allowed,
// else throwing exception
$anonsetting = $backup_controller->get_plan()->get_setting('anonymize');
$prevvalue = $userssetting->get_value();
$prevstatus = $userssetting->get_status();
$prevvalue = $anonsetting->get_value();
$prevstatus = $anonsetting->get_status();
$hasanoncap = has_capability('moodle/backup:anonymise', $coursectx, $userid);

// If setting is enabled but user lacks permission
Expand Down

0 comments on commit 9af849f

Please sign in to comment.