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 7171331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:23:36+00:00 2026-05-28T15:23:36+00:00

I am using Tank Auth, and require my users validate their email addresses. Upon

  • 0

I am using Tank Auth, and require my users validate their email addresses. Upon validation, users are still not logged in. I would like users to be automatically logged in when activating their account.

In my previous version (home-grown auth) I wrote a login function that didn’t require a password, that was only callable in that situation. However, I can’t see a way of doing that in Tank Auth. One solution would be to cache passwords until activation, but I really don’t want to do that…

  • 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-28T15:23:37+00:00Added an answer on May 28, 2026 at 3:23 pm

    You can just bypass your login system.

    Store either thier email address OR alias in a cookie.

    when they activate grab the cookie, search(verify they exist) for the user, then setup a normal login session.

    A login is just a set of session rules.

    inside your activation script/email process, append

    $this->_set_ac_cookie({email});
    

    –

    protected function _set_ac_cookie({email})
    {
        return $this->input->set_cookie(array(
            'name'  =>  'ac_cookie_'.{email},
            'expire'    =>  '7200', //You may mirror when/if your activation key expires
            'domain'    =>  'yourdomain.com',
            'path'  =>  '/'
        ));
    }
    

    check cookie exists

    protected function _before_activation({email})
    {
        return $this->input->cookie('ac_cookie_'.{email})) ? TRUE : FALSE;
        //make sure {email} has a UNIQUE db constraint
    }
    

    when the user clicks the activation link

    if($this->_before_activation({email}))
    {
            //check user exists AND activation status === false (0)
            //grab the user details from db based on {email}, set activation status to true (1)
    
            //setup login session
            $this->session->set_userdata(array(
                'logged_in' =>  (int)1,
                'user_id'   =>  {user->id},
                'alias' =>  {user->alias}
            ));
    
            redirect('dashboard');
    }
    else
    {
        //sorry!
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Tank Auth (it's working fine), but I can't get the form validation
I've got a login form and I'm using Tank Auth for form validation, etc.
I'm using CI's Auth Tank library to query records for certain users. The variable
Using Tank Auth for first time along with HMVC. In my application there are
I am using Tank Auth for Codeigniter to facilitate user registration and login. Problem:
I'm using Codeigniter and Tank Auth for a e-commerce website. I'm finding that if
I am using Codeigniter PHP Framework with Tank Auth authentication library. In my config
I'm using a reCaptcha class (the one that's included in the Tank Auth authentication
Hi I have been using tank auth for CI and I think it's awesome,
I am using Tank Auth for user authentication. I am using the database to

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.