Skip to content

Commit

Permalink
feature(routing): Render email validation page with view
Browse files Browse the repository at this point in the history
  • Loading branch information
ewinslow committed May 28, 2015
1 parent a06a7e2 commit b1060e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions mod/uservalidationbyemail/start.php
Expand Up @@ -7,7 +7,6 @@
* @subpackage UserValidationByEmail * @subpackage UserValidationByEmail
*/ */


elgg_register_event_handler('init', 'system', 'uservalidationbyemail_init');

This comment has been minimized.

Copy link
@mrclay

mrclay Jun 9, 2015

Member

This appears to be an accidental removal, causing #8443



function uservalidationbyemail_init() { function uservalidationbyemail_init() {


Expand Down Expand Up @@ -195,14 +194,19 @@ function uservalidationbyemail_check_auth_attempt($credentials) {
* @return bool * @return bool
*/ */
function uservalidationbyemail_page_handler($page) { function uservalidationbyemail_page_handler($page) {
$valid_pages = array('emailsent', 'confirm'); switch ($page[0]) {

case 'confirm':
if (empty($page[0]) || !in_array($page[0], $valid_pages)) { require __DIR__ . "/pages/confirm.php";
forward('', '404'); 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. // note, safe to include based on input because we validated above.
require dirname(__FILE__) . "/pages/{$page[0]}.php";
return true; return true;
} }


Expand Down

0 comments on commit b1060e5

Please sign in to comment.