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