mirror of
https://github.com/flarum/core.git
synced 2025-07-16 14:26:25 +02:00
Fix API key generation
This commit is contained in:
@ -31,8 +31,10 @@ class ApiKey extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function generate()
|
public static function generate()
|
||||||
{
|
{
|
||||||
return new static([
|
$key = new static;
|
||||||
'id' => str_random(40)
|
|
||||||
]);
|
$key->key = str_random(40);
|
||||||
|
|
||||||
|
return $key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user