]> git.mjollnir.org Git - moodle.git/commitdiff
A little fix for $CFG->loginhttps
authorjulmis <julmis>
Tue, 22 Jun 2004 18:35:59 +0000 (18:35 +0000)
committerjulmis <julmis>
Tue, 22 Jun 2004 18:35:59 +0000 (18:35 +0000)
- set $wwwrot variable earlier.

lib/weblib.php

index b77fc6032639a2c394e04000f3be8625f64d7ef0..3c35382a3c221894f8a59b56fa4d9d732ed5ddc2 100644 (file)
@@ -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 = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id\">$fullname</a>";
         if (isguest($user->id)) {