Skip to content

Commit

Permalink
rss MDL-25319 removing unnecessary call to isguestuser()
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Davis committed Nov 19, 2010
1 parent da8ae44 commit c05ccf3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rss/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@
rss_error('rsserror');
}

//calling isguestuser() just to make sure that $CFG->siteguest is set
isguestuser($token);
//make sure that $CFG->siteguest is set
if (empty($CFG->siteguest)) {
if (!$guestid = $DB->get_field('user', 'id', array('username'=>'guest', 'mnethostid'=>$CFG->mnet_localhost_id))) {
// guest does not exist yet, weird
rss_error('rsserror');
}
set_config('siteguest', $guestid);
}
$guesttoken = rss_get_token($CFG->siteguest);

//change forum to mod_forum (for example)
Expand Down

0 comments on commit c05ccf3

Please sign in to comment.