mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
looks like I might have finally fixed the darned bug where guest users were able to see the add/edit feeds link
This commit is contained in:
parent
865a6f2658
commit
7501d8a527
@ -77,7 +77,13 @@ class block_rss_client extends block_base {
|
||||
|
||||
//if the user is an admin, course teacher, or all users are allowed
|
||||
// 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 />';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user