Permalink
Browse files

MDL-34368 fix another validuntil condition

  • Loading branch information...
skodak authored and danpoltawski committed Aug 1, 2012
1 parent 6efb36b commit 8e6cbb58d89942fdbf3ad7406c7fd580756cc0eb
Showing with 1 addition and 1 deletion.
  1. +1 −1 webservice/lib.php
View
@@ -1458,7 +1458,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 8e6cbb5

Please sign in to comment.