Added a new setting called $CFG->defaultuserroleid which defines

the role that ALL users get by default when they log in.
This commit is contained in:
moodler 2006-09-14 09:39:23 +00:00
parent ea8158c118
commit 8f8ed475f7
12 changed files with 113 additions and 51 deletions

View file

@ -2098,7 +2098,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
if (isset($SESSION->justloggedin)) {
unset($SESSION->justloggedin);
if (!empty($CFG->displayloginfailures)) {
if (!empty($USER->username) and !isguest()) {
if (!empty($USER->username) and $USER->username != 'guest') {
if ($count = count_login_failures($CFG->displayloginfailures, $USER->username, $USER->lastlogin)) {
$menu .= '&nbsp;<font size="1">';
if (empty($count->accounts)) {
@ -2603,7 +2603,7 @@ function user_login_string($course=NULL, $user=NULL) {
if (isset($user->id) and $user->id) {
$fullname = fullname($user, true);
$username = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id\">$fullname</a>";
if (isguest($user->id)) {
if (isset($user->username) && $user->username == 'guest') {
$loggedinas = $realuserinfo.get_string('loggedinasguest').
" (<a target=\"{$CFG->framename}\" href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
} else {