From 871806779901183fc210542f0ef978bfc03e9c4c Mon Sep 17 00:00:00 2001 From: julmis Date: Tue, 22 Jun 2004 18:35:59 +0000 Subject: [PATCH] A little fix for $CFG->loginhttps - set $wwwrot variable earlier. --- lib/weblib.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index b77fc60326..3c35382a3c 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -441,7 +441,7 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos // global $CFG; - + if (empty($options)) { return ''; } @@ -1083,12 +1083,13 @@ function user_login_string($course, $user=NULL) { $realuserinfo = ""; } + if (empty($CFG->loginhttps)) { + $wwwroot = $CFG->wwwroot; + } else { + $wwwroot = str_replace('http','https',$CFG->wwwroot); + } + if (isset($user->id) and $user->id) { - if (empty($CFG->loginhttps)) { - $wwwroot = $CFG->wwwroot; - } else { - $wwwroot = str_replace('http','https',$CFG->wwwroot); - } $fullname = fullname($user, true); $username = "framename}\" href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname"; if (isguest($user->id)) { -- 2.39.5