vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   "Remember Me" Not Working.... (https://vborg.vbsupport.ru/showthread.php?t=224918)

davida500 10-09-2009 09:00 PM

"Remember Me" Not Working....
 
When people Log In to the forums and tick the "Remember Me" box they are obviously supposed to stay logged in.... When they leave the Forums and close their browser and then return to the website they need to log in again, and i don't know why this is.....

Below is the code to the login box that i have (the code is from the header template):

Code:

<if condition="$show['member']">
<else />
                <div id="login">
                <div class="loginContent" style="width: 515px; height: 56px">
                <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
                <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
                <table style="width: 100%">
                        <tr>
                                <td><label for="navbar_username"><b><span class="reg3">Username: </span></b></label></td>
                                <td><input class="field" type="text" name="vb_login_username" id="log" size="23" value="Username" onblur="if(this.value=='') this.value='Username';" onfocus="if (this.value == 'Username') this.value = '';" />
                                </td>
                                <td><label for="navbar_password"><b><span class="reg3">Password:</span></b></label>
                                </td>
                                <td><input class="field" type="password" name="vb_login_password" id="pwd" size="23" tabindex="102" value="******" onblur="if(this.value=='') this.value='******';" onfocus="if (this.value == '******') this.value = '';" />                                </td>
                                <td><input type="submit" name="submit" value="" class="button_login" />
                                        <input type="hidden" name="redirect_to" value=""/>
                <input type="hidden" name="s" value="$session[sessionhash]" />
                <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                <input type="hidden" name="do" value="login" />
                <input type="hidden" name="vb_login_md5password" />
                <input type="hidden" name="vb_login_md5password_utf" />
                                </td>
                        </tr>
                        <tr>
                                <td>
                                </td>
                                <td>
                                <label for="cb_cookieuser_navbar"><input name="cookieuser" id="rememberme" class="rememberme" type="checkbox" checked="checked" value="forever" /><span class="reg2">Remember me</span></label>
                                </td>
                                <td>
                                </td>
                                <td>
                                <a href="register.php"><span class="reg2">Register</span></a> | <a href="login.php?do=lostpw"><span class="reg2">Lost Your Password</span></a>
                                </td>
                                <td>
                                </td>
                        </tr>
                </table>
                </form>
                </div>
                <div class="loginClose"><a href="#" id="closeLogin">Close Panel</a></div>
                </div>
<!-- /login -->

    <div id="container1">
                <div id="top">
                <!-- login -->
                        <ul class="login">
                            <li class="left">&nbsp;</li>
                        <li>Hello Guest!</li>
                                <li>|</li>
                                <li><a id="toggleLogin" href="#">Log In</a></li>
<li>|</li>
<li><a href="/forums/register.php">Register</a></li>
                        </ul> <!-- / login -->
                </div> <!-- / top -->
               
</div>       

</if>

Please feel free to go to the forums and Register to test it yourself, you can see my login box is a little different to other forums too......www.e3-clan.net

Thanks to all that help :)

David.

Lynne 10-09-2009 09:22 PM

Create a new style with no parent:
  • Styles & Templates > Style Manager > Add New Style
  • Parent Style: No Parent Style
  • Title: Default vBulletin
  • Allow User Selection: Yes
  • Save
Set this as the default style when the users hit the site. Have them login with the Remember Me box checked. Now, after they leave the site and come back, are they still not logged in or is the expected behavior happening?

davida500 10-09-2009 09:40 PM

Yes, they appear to be staying logged in on this newly created style.

David.

--------------- Added [DATE]1255128408[/DATE] at [TIME]1255128408[/TIME] ---------------

Also, just figured this out...

When i switch to the style that you created, and click the "remember me" box, and then leave, and go back to the site, as you know it keeps me logged in.

I then switched the site back to the old style, and it will also keep me logged in forever unless i click "logout"...but then when i login using the Template that we usually use, it will log me out again when i leave (if that makes sense)..

So basically, if i login using the template you made me create, it will stay logged in regardless of which template i use after that, unless i manually log out. But if i login using the usual template it logs me out when i close the browser.

Lynne 10-09-2009 11:07 PM

That means that something is wrong with your login form. Go to edit your and take a look at the form, then click Show Default to view the default form and compare the two.

davida500 10-09-2009 11:24 PM

I have managed to fix it now, thanks Lynne :)

If you could quickly go over to www.e3-clan.net and click the "login" button at the top right, take a look and you will see that the boxes that you type your username and password into are basically the same colour, is there a way to change the colour of the login boxes.

Thanks again for the help :)

David.

Lynne 10-09-2009 11:41 PM

You can edit the <input> tags for each of those to change the background - add background: #xxxxxx; into the style tag in the <input> tag (where xxxxxx is the hex color code for the color you want).

davida500 10-10-2009 01:17 PM

Thank you Lynne, you always seem to be the one who helps me when i have a problem haha, i really appreciate it...If only everyone was as helpful as you :)

Thanks again.

David.


All times are GMT. The time now is 07:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01031 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete