Skip to content

Commit

Permalink
MDL-9227 Inconsistent HTTPS for profile edit page; merged from MOODLE…
Browse files Browse the repository at this point in the history
…_17_STABLE
  • Loading branch information
skodak committed Apr 6, 2007
1 parent 632b88d commit 2dcb2b2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
$strsearch = get_string('search');
$strshowallusers = get_string('showallusers');

if (empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}

admin_externalpage_print_header($adminroot);

if ($confirmuser and confirm_sesskey()) {
Expand Down Expand Up @@ -297,11 +303,6 @@
}

$mainadmin = get_admin();
if(empty($CFG->loginhttps)) {
$securewwwroot = $CFG->wwwroot;
} else {
$securewwwroot = str_replace('http:','https:',$CFG->wwwroot);
}

$table->head = array ("$firstname / $lastname", $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
Expand Down Expand Up @@ -408,15 +409,15 @@
echo "</td></tr></table>";

if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
print_table($table);
print_paging_bar($usercount, $page, $perpage,
"user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage".
"&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
if (has_capability('moodle/user:create', $sitecontext)) {
print_heading('<a href="../user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
print_heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
}

Expand Down

0 comments on commit 2dcb2b2

Please sign in to comment.