1

I am sending a link out via email to users when they register that they must click and it will automatically direct and log them into the site.

I'm getting a 404 error when trying to access this link.

Example email sent out:

www.someurl.com/custom_confirm/verify?email=test@test.com&hash=somehash

My hook menu in custom_confirm looks like this:

function custom_confirm_menu(){
    $items = array();

    $items['custom_confirm/verify'] = array(
        'title' => 'Confirming Registration',
        'page callback' => 'verify_email',
        'access callback' => TRUE,
    ); 
    return $items;
}

My function

function verify_email()

Is not being invoked when I hit this URL. It's giving me a 404 and not hitting any code inside the verify_email function.

Is there something wrong with this hook_menu? I don't understand why this is not working?

Exziled
  • 473
  • 5
  • 20
  • It seems your syntax is allright, try 2 things, clear the cache and if it does not work disable then uninstall your custom module and reinstall it. Menus tend to be a pain to deal with when dynamically changing them on activated modules. Also if your menu is just a callback then add type => MENU_CALLBACK, else it will be default value : MENU_NORMAL_ITEM wich is displayed in menus. – Laurent Fauvel Feb 26 '16 at 07:58
  • I realized it was because when I was pushing up to the DEV environment it was migrating the DB changes and not clearing cache on dev -.- was literally just a cache issue -.- – Exziled Feb 26 '16 at 18:47

0 Answers0