Skip to content

Commit

Permalink
looks like I might have finally fixed the darned bug where guest user…
Browse files Browse the repository at this point in the history
…s were able to see the add/edit feeds link
  • Loading branch information
dhawes committed Jan 29, 2005
1 parent 865a6f2 commit 7501d8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion blocks/rss_client/block_rss_client.php
Expand Up @@ -77,7 +77,13 @@ function get_content() {


//if the user is an admin, course teacher, or all users are allowed //if the user is an admin, course teacher, or all users are allowed
// then allow the user to add rss feeds // then allow the user to add rss feeds
if ( !isguest() && (isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher)) ) { global $USER;
$userisloggedin = false;
if (isset($USER) && isset($USER->id) && $USER->id && !isguest()) {
$userisloggedin = true;
}
if ( $userisloggedin && (isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher)) ) {
echo 'ADDING TO OUTPUT';
$output .= '<div align="center"><a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?courseid='. $courseid .'">'. get_string('block_rss_feeds_add_edit', 'block_rss_client') .'</a></div><br />'; $output .= '<div align="center"><a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?courseid='. $courseid .'">'. get_string('block_rss_feeds_add_edit', 'block_rss_client') .'</a></div><br />';
} }


Expand Down

0 comments on commit 7501d8a

Please sign in to comment.