Skip to content

Instantly share code, notes, and snippets.

@abelorian
Created September 12, 2014 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abelorian/f88f7f170171f9be30da to your computer and use it in GitHub Desktop.
Save abelorian/f88f7f170171f9be30da to your computer and use it in GitHub Desktop.
Generate a new token
public function token() {
$token = md5(uniqid(rand(), true));
$this->session->set_userdata('token', $token);
return $token;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment