Commit 13075628 authored by Damyon Wiese's avatar Damyon Wiese Committed by Dan Poltawski
Browse files

MDL-55071 core_auth: Move new login renderable to core_auth

Part of MDL-55071
parent 256edb99
......@@ -17,12 +17,12 @@
/**
* Login renderable.
*
* @package core_output
* @package core_auth
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core\output;
namespace core_auth\output;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/externallib.php');
......@@ -38,7 +38,7 @@ use templatable;
/**
* Login renderable class.
*
* @package core_output
* @package core_auth
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
......
......@@ -4267,10 +4267,10 @@ EOD;
/**
* Renders the login form.
*
* @param \core\output\login_form $form The renderable.
* @param \core_auth\output\login $form The renderable.
* @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);
// 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->box_end();
} else {
$loginform = new \core\output\login($authsequence, $frm->username);
$loginform = new \core_auth\output\login($authsequence, $frm->username);
$loginform->set_error($errormsg);
echo $OUTPUT->render($loginform);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment