Browse files

MDL-34368 fix another validuntil condition

  • Loading branch information...
1 parent 90105eb commit b093fd5e5a691b2b6f074bab39b91489a7a88cc8 @skodak skodak committed with danpoltawski Aug 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 webservice/lib.php
View
2 webservice/lib.php
@@ -1612,7 +1612,7 @@ protected function load_function_info() {
FROM {external_services} s
JOIN {external_services_functions} sf ON (sf.externalserviceid = s.id AND s.restrictedusers = 1 AND sf.functionname = :name2)
JOIN {external_services_users} su ON (su.externalserviceid = s.id AND su.userid = :userid)
- WHERE s.enabled = 1 AND su.validuntil IS NULL OR su.validuntil < :now $wscond2";
+ WHERE s.enabled = 1 AND (su.validuntil IS NULL OR su.validuntil < :now) $wscond2";
$params = array_merge($params, array('userid'=>$USER->id, 'name1'=>$function->name, 'name2'=>$function->name, 'now'=>time()));
$rs = $DB->get_recordset_sql($sql, $params);

0 comments on commit b093fd5

Please sign in to comment.