I have a custom login/registration page and I would like to use this module to provide a “Login/Register” link in the header. Because this is a customer page, its path isn’t user/login rather something else. I’ve tried to change all the “link_paths” in the code from user/login and/or user/register to my designated path but it doesn’t work. I still get the previous path. The custom page houses both the login and registration forms because I don’t like the tabs at the top of the default page. If you can show me how to get to my custom page from the link provided, I’d appreciate it.
Comments
Comment #1
mattyoung commentedsee accountmenu.module::accountmenu_translated_menu_link_alter(&$item)
you can implement this and change the link path to yours, I think.
Comment #2
sorensong commentedIs there a patch that will allow changing the path to a custom node? For example the 'Signup Now' link would link to a '/node/choose-accout-type' which would give the user an option to sign up for a 'Standard Account' or an 'Expanded Account' instead of the default '/user/register' registration page?
Comment #3
mattyoung commentedNot sure how to do this in some sustainable way...this module can't possible handle every install configuration....
So, if you cannot think of a configureable way to add this functionality, I can't think of one now.
Comment #4
john franklin commented@mariner702, have you tried using hook_menu_alter() to change user/login to reference your page instead of the standard Drupal page?
Comment #5
john franklin commentedReading over this a bit more carefully, what you're looking to do is outside the scope of this module. You'll want to use hook_menu_alter() to replace the default 'user/register' and 'user/login' router entries with your own.
And, the replacement won't be a node, but a custom callback that renders both the login and register forms on the same page. I think LoginToboggan has an example of a single page with both forms.