API page: https://api.drupal.org/api/drupal/modules!user!user.api.php/function/hoo...

Enter a descriptive title (above) relating to function hook_user_login, then describe the problem you have found:

I've created a menu link with hook_menu() with a url 'login'.
I'd like to send my users to a login form (page maybe) and then back to the page they were on when they pressed my 'login' link.

In my page callback I can not get destination work with goto. I've tried setting up:
1. destination in query string,
2. $_GET['destination']

I print out following things with devel module:
1. $_SERVER['HTTP_REFERER']
2. drupal_get_destination()
They all contain 'login' for some reason. (dont know why; is it login hookor what?) so i can not use them to get where user came from.
This can be a bug or not. I dont know it.

When I set up a static path like 'node' it work properly.

Can someone tell me a solution for this please?

Thanks

Comments

bsandor’s picture

Issue summary: View changes
jhodgdon’s picture

Status: Active » Fixed

It looks like you need some programming support.

I'm sorry, but although you can create issues in Drupal Core and mark the category as "support request", we don't really handle support requests in the Drupal Core issue queue as a regular practice (that option is mostly there for filing support issues for contributed modules and themes).

There are several support options listed if you click on "Support" at the top of Drupal.org, which will take you to:
http://drupal.org/support

There you can find out about the Drupal IRC channels, and the Forums, which are our two main support mechanisms in the Drupal community.

Good luck with your issue!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.