Merge pull request #14 from j2L4e/patch-1

Update pendingregist.php
This commit is contained in:
Pellaeon Lin 2015-07-21 10:45:09 +08:00
commit 84ee6dcce3
1 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,11 @@ class PendingRegist {
public function save($email) {
$query = $this->db->prepareQuery( 'INSERT INTO `*PREFIX*registration`'
.' ( `email`, `token`, `requested` ) VALUES( ?, ?, NOW() )' );
$token = $this->random->generate(30);
do {
$token = $this->random->generate(30);
} while (preg_match('/[\/]++/', $token));
$query->execute(array( $email, $token ));
return $token;
}