mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-55071 core_auth: Move new login renderable to core_auth
Part of MDL-55071
This commit is contained in:
parent
256edb99de
commit
13075628ab
3 changed files with 6 additions and 6 deletions
|
@ -17,12 +17,12 @@
|
||||||
/**
|
/**
|
||||||
* Login renderable.
|
* Login renderable.
|
||||||
*
|
*
|
||||||
* @package core_output
|
* @package core_auth
|
||||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace core\output;
|
namespace core_auth\output;
|
||||||
defined('MOODLE_INTERNAL') || die();
|
defined('MOODLE_INTERNAL') || die();
|
||||||
|
|
||||||
require_once($CFG->libdir . '/externallib.php');
|
require_once($CFG->libdir . '/externallib.php');
|
||||||
|
@ -38,7 +38,7 @@ use templatable;
|
||||||
/**
|
/**
|
||||||
* Login renderable class.
|
* Login renderable class.
|
||||||
*
|
*
|
||||||
* @package core_output
|
* @package core_auth
|
||||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
*/
|
*/
|
|
@ -4267,10 +4267,10 @@ EOD;
|
||||||
/**
|
/**
|
||||||
* Renders the login form.
|
* Renders the login form.
|
||||||
*
|
*
|
||||||
* @param \core\output\login_form $form The renderable.
|
* @param \core_auth\output\login $form The renderable.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function render_login(\core\output\login $form) {
|
public function render_login(\core_auth\output\login $form) {
|
||||||
$context = $form->export_for_template($this);
|
$context = $form->export_for_template($this);
|
||||||
|
|
||||||
// Override because rendering is not supported in template yet.
|
// Override because rendering is not supported in template yet.
|
||||||
|
|
|
@ -349,7 +349,7 @@ if (isloggedin() and !isguestuser()) {
|
||||||
echo $OUTPUT->confirm(get_string('alreadyloggedin', 'error', fullname($USER)), $logout, $continue);
|
echo $OUTPUT->confirm(get_string('alreadyloggedin', 'error', fullname($USER)), $logout, $continue);
|
||||||
echo $OUTPUT->box_end();
|
echo $OUTPUT->box_end();
|
||||||
} else {
|
} else {
|
||||||
$loginform = new \core\output\login($authsequence, $frm->username);
|
$loginform = new \core_auth\output\login($authsequence, $frm->username);
|
||||||
$loginform->set_error($errormsg);
|
$loginform->set_error($errormsg);
|
||||||
echo $OUTPUT->render($loginform);
|
echo $OUTPUT->render($loginform);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue