mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 17:37:23 +08:00
support modify personal attendance card
This commit is contained in:
@@ -219,6 +219,7 @@ class UserRepository extends BaseRepository
|
||||
'downloaded' => 'downloaded',
|
||||
'bonus' => 'seedbonus',
|
||||
'invites' => 'invites',
|
||||
'attendance_card' => 'attendance_card',
|
||||
];
|
||||
if (!isset($fieldMap[$field])) {
|
||||
throw new \InvalidArgumentException("Invalid field: $field, only support: " . implode(', ', array_keys($fieldMap)));
|
||||
@@ -240,6 +241,9 @@ class UserRepository extends BaseRepository
|
||||
} else {
|
||||
throw new \InvalidArgumentException("Invalid action: $action.");
|
||||
}
|
||||
if ($new < 0) {
|
||||
throw new NexusException("New value($new) lte 0");
|
||||
}
|
||||
//for administrator, use english
|
||||
$modCommentText = nexus_trans('message.field_value_change_message_body', [
|
||||
'field' => nexus_trans("user.labels.$sourceField", [], 'en'),
|
||||
|
||||
Reference in New Issue
Block a user