mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-05-03 16:53:31 +02:00
Validate unhashed Hashids and return only first array value
This commit is contained in:
parent
40362ad7c9
commit
7af83732eb
1 changed files with 5 additions and 1 deletions
|
@ -35,6 +35,10 @@ class Token {
|
|||
}
|
||||
|
||||
public function unhash ($hash) {
|
||||
return $this->hashids->decode($hash);
|
||||
$unhashed = $this->hashids->decode($hash);
|
||||
if (count($unhashed) > 0) {
|
||||
return $unhashed[0];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue