Created
September 12, 2014 00:11
-
-
Save abelorian/f88f7f170171f9be30da to your computer and use it in GitHub Desktop.
Generate a new token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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