Skip to content

Commit

Permalink
feat(user rule): add language
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B committed Feb 10, 2025
1 parent d11271d commit 3351f21
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/RuleRight.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public function executeActions($output, $params, array $input = [])
$output['timezone'] = $action->fields['value'];
break;

case 'language':
$output['language'] = $action->fields['value'];
break;

case "_ignore_user_import":
$continue = false;
$output_src["_stop_import"] = true;
Expand Down Expand Up @@ -320,6 +324,9 @@ public function getActions()
$actions['timezone']['name'] = __('Timezone');
$actions['timezone']['type'] = 'timezone';

$actions['language']['name'] = __('Language');
$actions['language']['type'] = 'language';

$actions['_deny_login']['name'] = __('Deny login');
$actions['_deny_login']['type'] = 'yesonly';
$actions['_deny_login']['table'] = '';
Expand All @@ -343,6 +350,11 @@ public function displayAdditionalRuleAction(array $action, $value = '')
]
);
return true;
case 'language':
Dropdown::showLanguages('value', [
'display_emptychoice' => true
]);
return true;
}
return false;
}
Expand Down

0 comments on commit 3351f21

Please sign in to comment.