This is my first official post so bare with me if i do not have all the information you may need.
Being a beginner of Drupal from a PHP background I am struggling with SESSIONS.
First, there are conflicting information I am reading on how one should set sessions, some say it we should use a unique key, like so: $_SESSION["uniquekey"] = array(); $_SESSION["uniquekey"]["variable"] = 1;
Others say this is sufficient:
$_SESSION["variable"] = 1;
Secondly, I have managed to set Anonymous sessions without problems, this sets the UID to 0 in the sessions table, the problem I am experiencing is when I login.
Login is succeeding but I am getting "you have no authentication etc" and therefore unable to access the CMS. FYI in the session table, it has inserted another session with UID set as 1. I am having to destroy the anonymous session to access the whole CMS but from what I understand the login form should regenerate?
I am setting the sessions in template.php and logging in user /user
Would appreciate if some people can share some light on how one can set sessions without breaking the login?
Your help would be much appreciated
Cheers