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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:56:13+00:00 2026-06-09T15:56:13+00:00

I am using a login form which allows the user to use yii’s ‘remember

  • 0

I am using a login form which allows the user to use yii’s ‘remember me’ option.
During the first login I am setting some user->state values which of course will be lost after the session ended.
Now what is the best way to set these states again if the user gets automatically logged in again through the ‘remember me’ cookie.
So far I have been setting some user states within the UserIdentity class (in the components folder) after the user has successfully logged in:

Yii::app()->user->setState('someKey', $someValue);

What would be best to restore these states once auto login gets used?
I do not want to store the set user states in a cookie since they might contain too security sensitive data.

  • 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-06-09T15:56:14+00:00Added an answer on June 9, 2026 at 3:56 pm

    Sorry for the quick answer, but these are a few possibilities:

    1. Implement your own database that stores the user’s states based on their login username.
    2. Implement your own version of a State persister and reference it in your config.php. Implement your own version of a StatePersisteer that is database-based as stated here: http://www.yiiframework.com/doc/api/1.1/CStatePersister. Then find a way to reference that state when logged in.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
I have the following method which allows a user to login into my application:
I am trying to login to a site using a login form and submit
I'm using a custom login form, the same as the one in wp-admin, the
I am new In ASP.NET, I want to create to Login Form using Membership
I am new to zend. I am trying to create login form using zend
I am using Thickbox 3.1 for a login form, using the iframe version. I
I'm using MVC. I copied the login form from the login page and inserted
I'm automating form login in a certain site using the WebBrowser control. Having the
I'm using Spring Security 3 and my ApplicationContext-Security.xml specifies <form-login login-page=/genesis default-target-url=/diagnostics/start-diagnostics authentication-failure-url=/genesis?authfailed=true authentication-success-handler-ref=customTargetUrlResolver/>

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.