1
0
Fork 0
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:
Robbie Antenesse 2018-01-04 23:02:39 -07:00
parent 40362ad7c9
commit 7af83732eb

View file

@ -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;
}
}