What role does User_auth_key play in thinkphp? What are the benefits of having a session in C (' User_auth_key ')?
Is studying thinkphp login detection, login successfully saved Session see two forms, the first kind: session::set (' username ', $_post[' username ');
The second type:
Session::set (C (' User_auth_key '), $username);
The second method needs to write ' user_auth_key ' = ' authId ' in the configuration file,
Could you explain the difference between the two methods? What's the second set of this user_auth_key?
Some say it is to prevent a conflict in the session where the user ID is stored when multiple sets of thinkphp are running under a domain name. But I don't know if it's going to happen. What happens if not, will there be two sessions with the same session ID? thinkphp Session User_auth_key
Share to:
------Solution--------------------
In fact, both are set session only, the latter session of the key is cured in the configuration file, many times just modify the configuration file User_auth_key configuration section below the value can change the session key
------Solution--------------------
I think the main purpose is to use the session encryption.