Always seed the demo user with the same API key.

This commit is contained in:
James Brooks
2015-03-16 08:47:25 +00:00
parent 04b06ec729
commit ae10f49ff3
2 changed files with 4 additions and 1 deletions

View File

@@ -65,7 +65,9 @@ class User extends Model implements UserInterface, RemindableInterface
parent::boot();
self::creating(function ($user) {
$user->api_key = self::generateApiKey();
if (! $user->api_key) {
$user->api_key = self::generateApiKey();
}
});
}