sorry if this question has been asked a million times... it seems to be a common request but one that i can't get a concrete solution to!
i have a site written in asp.net where people register. during registration we create a moodle user using the moodle api running on our moodle site and store the id against the account. we would then like to be able to log the user in using this id on our moodle site. the asp.net and the moodle website are running on different domains but have access to the databases for both.
having dug through the php code i found that row is created in the 'mdl_sessions' table when user logs in. so my thinking was to create a row for the user in this table and then create the 'MoodleSession' cookie in the users browser. it appears that the value of the cookie is the session id for which i've been using the asp.net session id. then when we redirect the user to their course they're already logged in. so far so good.
however it appears that the 'sessdata' column in this table contains a base64 encoded string of session and user information and i can't figure out how to get this info in the right format in the asp.net site.
is this at all possible? am i barking up the wrong tree and going about this completely the wrong way?!
any pointers in the right direction would be greatly received ;)