MDL-55071 core_auth: Move new login renderable to core_auth

Part of MDL-55071
This commit is contained in:
Damyon Wiese 2016-09-21 13:20:03 +08:00 committed by Dan Poltawski
parent 256edb99de
commit 13075628ab
3 changed files with 6 additions and 6 deletions

View File

@ -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
*/

View File

@ -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.

View File

@ -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);
}