mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-17754 next round of session related refactoring
This commit is contained in:
parent
6c928b4cfe
commit
b7b64ff2e0
13 changed files with 105 additions and 80 deletions
|
@ -411,7 +411,7 @@
|
|||
if ($passwordchangeurl) {
|
||||
$params = array('id'=>$course->id);
|
||||
|
||||
if (is_loggedinas()) {
|
||||
if (session_is_loggedinas()) {
|
||||
$passwordchangeurl = ''; // do not use actual change password url - might contain sensitive data
|
||||
} else {
|
||||
$parts = explode('?', $passwordchangeurl);
|
||||
|
@ -429,7 +429,7 @@
|
|||
foreach($params as $key=>$value) {
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.s($value).'" />';
|
||||
}
|
||||
if (is_loggedinas()) {
|
||||
if (session_is_loggedinas()) {
|
||||
// changing of password when "Logged in as" is not allowed
|
||||
echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" disabled=\"disabled\" />";
|
||||
} else {
|
||||
|
@ -471,7 +471,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (!$user->deleted and $USER->id != $user->id && !is_loggedinas() && has_capability('moodle/user:loginas', $coursecontext) &&
|
||||
if (!$user->deleted and $USER->id != $user->id && !session_is_loggedinas() && has_capability('moodle/user:loginas', $coursecontext) &&
|
||||
! has_capability('moodle/site:doanything', $coursecontext, $user->id, false)) {
|
||||
echo '<form action="'.$CFG->wwwroot.'/course/loginas.php" method="get">';
|
||||
echo '<div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue