mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
fix add props ignore deadline
This commit is contained in:
@@ -471,6 +471,9 @@ class UserRepository extends BaseRepository
|
||||
$metaKey = $metaData['meta_key'];
|
||||
$allowMultiple = UserMeta::$metaKeys[$metaKey]['multiple'];
|
||||
$log = "user: {$user->id}, metaKey: $metaKey, allowMultiple: $allowMultiple";
|
||||
if (!empty($metaData['duration'])) {
|
||||
$metaData['deadline'] = now()->addDays($metaData['duration']);
|
||||
}
|
||||
if ($allowMultiple) {
|
||||
//Allow multiple, just insert
|
||||
$result = $user->metas()->create($metaData);
|
||||
|
||||
Reference in New Issue
Block a user