Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4076186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:23:35+00:00 2026-05-20T17:23:35+00:00

Hi I have been using tank auth for CI and I think it’s awesome,

  • 0

Hi I have been using tank auth for CI and I think it’s awesome, I was just wondering if there was a way to change it so when a user refreshes the login page (after login errors), the ‘confirm form resubmission’ popup does not show up. I have been reading up on the post redirect get method but I dont wanna mess up tank auth. ps – im pretty noobish

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:23:35+00:00Added an answer on May 20, 2026 at 5:23 pm

    This ‘confirm form resubmission’ is from your web browser, not from Tank Auth.
    Some time ago someone coding a web browser realised that reposting is a big problem so they put in a warning to stop ppl double-posting and such.

    I can think of 2 ways to avoid it.

    1) Make the login ‘post’ into a ‘get’.
    This is a BAD idea. cos your password is in the query string

    2) In the auth controller redirect to an error display version of the login form on login fail instead of loading the login form view again.

    basically you find a way to pass the error message to your login form via query string or session. the redirect to that page. Its pretty easy since tank auth uses language keys for errors.

    I just tried it as a query string.. seems to work ok, but my tank auth is pretty heavily modified.

    I added this to controllers/auth.php right after the part where it says //fail

    redirect('auth/login/'.$errors['login']);
    

    this takes the login error key generated by tank auth and passes it back to http://yoursite/auth/login as a query parameter.

    then at the top of the login function I put this:

    function login($error = ''){
        if ($error != '') {
            $data['errors']['login'] = $this->lang->line($error);
            $this->load->view('auth/login_form', $data);
        }
    

    this code grabs the parameter if its there.. then grabs the appropriate line from your language file, then loads the login form.

    note this will only handle ‘login’ errors. you will need to pass more query parameters to handle things like validation errors.

    // edit
    I thought I’d try the session way.. and its much neater.

    this goes at the //fail spot

    $this->session->set_flashdata('login_error', $this->lang->line($errors['login']));
    redirect('/auth/login');
    

    and something like this goes in views/auth/login_form.php instead of where the form_errors are.

    <? if ( $this->session->flashdata('login_error') != '') {
        echo '<p style="color:#f00;">'.$this->session->flashdata('login_error').'</p>';
    } ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the storyboard to make an application and currently there are
I have been using CI just fine using the MySQL driver. I want to
I have been using Javascript but more in a procedural way not the object
I have been using Javascript for a while and I have just tried using
Have been using ActivePython on windows7 and lxml seems working without an issue.. There
I have been using TortoiseSVN for some time and I really like it. I
I have been using Stanford POS Tagger to tag parts of speech in a
I have been using play 1.2.5rc4 for development of one app and I have
I have been using an API to do some work. This is how I
I have been using some Javascript to create a text field once an certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.