mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36: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
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
|
||||
/// do not use when in course login as
|
||||
if (is_loggedinas() and $USER->loginascontext->contextlevel == CONTEXT_COURSE) {
|
||||
if (session_is_loggedinas() and $USER->loginascontext->contextlevel == CONTEXT_COURSE) {
|
||||
print_error('loginasnoenrol', '', $CFG->wwwroot.'/course/view.php?id='.$USER->loginascontext->instanceid);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/// Reset user back to their real self if needed
|
||||
$return = optional_param('return', 0, PARAM_BOOL); // return to the page we came from
|
||||
|
||||
if (is_loggedinas()) {
|
||||
if (session_is_loggedinas()) {
|
||||
if (!confirm_sesskey()) {
|
||||
print_error('confirmsesskeybad');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue