This is one of those rare cases where I feel like I've tried everything! Help would be much appreciated...
I have created a custom theme. I'm using front.tpl.php to have a completely different layout for my home page. On it I would like to place a custom login box, which toggles to a My Account / Logout link when the user is already logged in. All other login boxes are working fine -- it's just the one on the home page that's giving me grief. It simply (re)loads the page without logging the user in.
I am (well, was, as I have it disabled now to try and get this working) using LoginToboggin. I tried the snippet on this page with no luck. I'm using clean URLs, so I updated the form action to match. No luck. I grabbed various form/field properties from viewing source on other login pages. Still no luck. I checked out the user.module file to see where Drupal gets its form settings from and saw this:
$form['#action'] = url($_GET['q'], drupal_get_destination());
If I'm reading that right, it seems that Drupal gets the form's action from the hidden page destination field itself. *scratches head*
Anyway, that's a whole lot of rambling about what I've done, but I have no idea what else to try. How does one create a login box from scratch??
Anyone who would like to take a look is welcome to contact me for the URL.
Thank you!
Comments
im doin the same thing after
im doin the same thing
after searching this thread looks promising
http://drupal.org/node/58405
------------
http://ojk007.com
This code ended up working
This code ended up working for me:
Awesome, works for me
Awesome, works for me too
also try
http://ojk007.com
Not working
I've tried:
<form action="<?php print url($_GET['q'], drupal_get_destination())?>" method="post" id="user-login-form">and nothing happens when I try to log in. I just end up on the start page again, but not logged in.
I've tried:
<form action="user/login" method="post">but then I end up going to the standard login screen and have to fill in user name and password again.
I'm using Drupal 5.5
Any ideas?
Found it!
I had
<input name="form_id" id="edit-user-login-block" value="user_login_block" type="hidden" />in stead of
<input name="form_id" id="edit-user-login-block" value="user_login" type="hidden" />I had to change value to "user_login" in the hidden field, now it works!
If you want the login block to appear on any page and stay on that page when you log in, use
<form id="user-login-form" method="post" action="user/login<?php print url($_GET['destination'], drupal_get_destination())?>">That worked for me anyway.
This worked for me too
Thanks psi36
This script not using Clean URLS
Could someone tell me how to modify this script when not using clean urls?
Thanks
Without Clean URL
subscribing
I want to integrate my "Join box" with the functionality of logintoboggin or user login.
It has been a little difficult so thank you for this.
Chris
http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.
thanks for this custom login block code
bookmarking
custom log in front page
subscribing