Update pendingregist.php
no more tokens containing slashes to prevent problems URL generation error ("token" for route "registration.register.verifyToken" must match "[^/]++")
This commit is contained in:
parent
a0ac90e257
commit
29379c373d
|
|
@ -21,7 +21,11 @@ class PendingRegist {
|
||||||
public function save($email) {
|
public function save($email) {
|
||||||
$query = $this->db->prepareQuery( 'INSERT INTO `*PREFIX*registration`'
|
$query = $this->db->prepareQuery( 'INSERT INTO `*PREFIX*registration`'
|
||||||
.' ( `email`, `token`, `requested` ) VALUES( ?, ?, NOW() )' );
|
.' ( `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 ));
|
$query->execute(array( $email, $token ));
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue