• Hi, I am using Ajax Login plugin, one thing I noticed is that when you login and close the browser it will not logout automatically.

    This might be a security issue particularly in my case that I have posts that are restricted for members only.

    How can I solved this? Are there any other Login Script that I can put on the content of pages and will direct users to a page and not on Dashboard? Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Have you tried it without the plugin?

    Unless set otherwise, most browsers don’t delete cookies once they are closed.

    I find on my install, I’m never logged out unless I actually physically log out, even if I turn off my computer.

    Naturally you could hack the source and change the life of the cookie to something smaller, like 3 hours.

    I’ve never used the ajax login plug before, but I don’t think this is an issue with it.

    Thread Starter bongkph

    (@bongkph)

    Without the plugin, WP logs-out when browser was closed. Is there a way I can make a login filed on a page content and redirect it to a certain page after login?

    If it can be done, I guess I dont need this Ajax Login plugin anymore.

    You can easily put a login field anywhere you want..
    1) Logout then go to the login page (without ajax plugin).
    2) Take note of the form details (ie: action, method, input details – both hidden and visible etc).
    3) Create a form anywhere, make it look however you want but make sure it has the same details as the login one or it wont work

    All done, though obviously you need some html knowledge.

    As for the redirect – You have 2 options here:
    1) If you’re going to use the original login page, just send the variable to the page under the redirect_to name – eg:

    wp-login.php?redirect_to=wp-content/

    2) If you’re adding in your own login form, change the hidden input that’s named redirect_to to whatever address you want them sent to.

    The login form in it’s raw state can be found in wp-login.php around line 273.

    Thread Starter bongkph

    (@bongkph)

    thanks pipeline, its works with the wordpress login however, how can I make a link on the sidebar to logout the user if login.

    Something like a “Logout” on sidebar if the user is loged in already.

    And that same link will show “Login” link if not yet login…

    It would be nice if I can make it just like what on Ajax where it shows the “Username , Logout (link)” if the user is logged in. And it will show a “Login, Register (link)” if the user is not yet logged.

    Use the function wp_loginout().

    It takes no variables, but it displays the login link if not logged in, and the logout if they are.

    pipelineap.. sounds like you know what i need except im not as advanced as you to follow your post as to how to add a login widget and have members only side and public or total members only.. How would you reccommend i do this in lamens terms.. im a design novice.. whos knows nothing about php css just thae basics.. your help is genuinely appriciated

    Mohegan

    Well, if you have the Samsarin PHP plugin, you could just put that code and nothing else in the php widget.

    What he’s saying is that when the PHP engine processes the wp_loginout() function, exactly as he wrote it (nothing between the parenthesis), WordPress just puts a log in prompt if the user is not logged in, and and log out prompt if the user IS logged in.

    I don’t know if it’ll work in the widget, but the Samsarin PHP plugin is a n easy way to add PHP text into a sidebar widget. I used it for a Verse of the Day plugin.

    guys i used the Ajaxlogin after i upload the files into my plugins i did activate and when i add in the widgets it says “there are no options…” please save me! thanks ??

    guys please help me how to use the ajax login thanks.

    help me how to use the Ajaxlogin please thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Ajax Login’ is closed to new replies.