Permalink
Browse files

feature(routing): Render email validation page with view

  • Loading branch information...
ewinslow committed May 28, 2015
1 parent a06a7e2 commit b1060e52f14de33d59cf3106da768d62768c2774
@@ -7,7 +7,6 @@
* @subpackage UserValidationByEmail
*/
elgg_register_event_handler('init', 'system', 'uservalidationbyemail_init');

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jun 9, 2015

Member

This appears to be an accidental removal, causing #8443

@mrclay

mrclay Jun 9, 2015

Member

This appears to be an accidental removal, causing #8443

function uservalidationbyemail_init() {
@@ -195,14 +194,19 @@ function uservalidationbyemail_check_auth_attempt($credentials) {
* @return bool
*/
function uservalidationbyemail_page_handler($page) {
$valid_pages = array('emailsent', 'confirm');
if (empty($page[0]) || !in_array($page[0], $valid_pages)) {
forward('', '404');
switch ($page[0]) {
case 'confirm':
require __DIR__ . "/pages/confirm.php";
break;
case 'emailsent':
echo elgg_view("resources/uservalidationbyemail/emailsent");
break;
default:
forward('', '404');
return false;
}
// note, safe to include based on input because we validated above.
require dirname(__FILE__) . "/pages/{$page[0]}.php";
return true;
}

0 comments on commit b1060e5

Please sign in to comment.