Welcome Guest, Not a member yet? Register   Sign In
How would you get this done?
#5

[eluser]NachoF[/eluser]
[quote author="jedd" date="1238967072"]As soon as your client lands - which would equate to when you record the session_id in your database - you want to create another, different, unique identifier for that user, and set it in the cookie.

So, as soon as you detect you are talking to a new client:

Code:
$this->session->set_userdata('identity',  $xyz);

From then on, you identify the user by that 'identity' (specifically by $this->session->userdata('identity').)

$xyz is something you create, using whatever algorithm you like in order to generate a unique id. I'd be opting for the session_id, but it could be anything. The point is that once that's done, you can totally ignore userdata('session_id').

Your code would require minimal changes - obviously you refer to 'identity' wherever you currently refer to 'session_id'.[/quote]

I see.... then I guess my question can be summed up as.... what algorithm would you use??.. I havent a clue


Messages In This Thread
How would you get this done? - by El Forum - 04-04-2009, 10:28 PM
How would you get this done? - by El Forum - 04-05-2009, 01:51 AM
How would you get this done? - by El Forum - 04-05-2009, 08:20 AM
How would you get this done? - by El Forum - 04-05-2009, 10:31 AM
How would you get this done? - by El Forum - 04-05-2009, 07:28 PM
How would you get this done? - by El Forum - 04-06-2009, 03:22 AM
How would you get this done? - by El Forum - 04-06-2009, 10:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB