Permalink
Browse files

A little fix for $CFG->loginhttps

- set $wwwrot variable earlier.
  • Loading branch information...
1 parent ab1324e commit 871806779901183fc210542f0ef978bfc03e9c4c julmis committed Jun 22, 2004
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/weblib.php
View
@@ -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)) {

0 comments on commit 8718067

Please sign in to comment.