mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-56955-master' of git://github.com/lameze/moodle
This commit is contained in:
commit
4495ddcf9f
@ -1008,12 +1008,20 @@ class core_renderer extends renderer_base {
|
||||
* @return string HTML that you must output this, preferably immediately.
|
||||
*/
|
||||
public function header() {
|
||||
global $USER, $CFG;
|
||||
global $USER, $CFG, $SESSION;
|
||||
|
||||
if (\core\session\manager::is_loggedinas()) {
|
||||
$this->page->add_body_class('userloggedinas');
|
||||
}
|
||||
|
||||
if (isset($SESSION->justloggedin) && !empty($CFG->displayloginfailures)) {
|
||||
require_once($CFG->dirroot . '/user/lib.php');
|
||||
// Set second parameter to false as we do not want reset the counter, the same message appears on footer.
|
||||
if ($count = user_count_login_failures($USER, false)) {
|
||||
$this->page->add_body_class('loginfailures');
|
||||
}
|
||||
}
|
||||
|
||||
// If the user is logged in, and we're not in initial install,
|
||||
// check to see if the user is role-switched and add the appropriate
|
||||
// CSS class to the body element.
|
||||
|
@ -299,7 +299,8 @@ div#dock {
|
||||
}
|
||||
|
||||
.userloggedinas,
|
||||
.userswitchedrole {
|
||||
.userswitchedrole,
|
||||
.loginfailures {
|
||||
.usermenu {
|
||||
.usertext {
|
||||
float: left;
|
||||
|
Loading…
x
Reference in New Issue
Block a user