• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2766 (tree)
Time2021-08-16 03:45:14
Authorumethyl

Log Message

OptionManager::ExistsWishRole()

Change Summary

Incremental Difference

--- trunk/include/controller/user_manager_class.php (revision 2765)
+++ trunk/include/controller/user_manager_class.php (revision 2766)
@@ -117,7 +117,7 @@
117117 DB::LoadUser();
118118
119119 //希望役職チェック
120- if (! in_array($role, OptionManager::GetWishRoleList())) {
120+ if (false === OptionManager::ExistsWishRole($role)) {
121121 self::OutputError($title, UserManagerMessage::CHECK_WISH_ROLE . $back_url);
122122 }
123123
--- trunk/include/option/option_class.php (revision 2765)
+++ trunk/include/option/option_class.php (revision 2766)
@@ -179,6 +179,11 @@
179179 return OptionLoader::Load('wish_role')->GetWishRole();
180180 }
181181
182+ //希望役職存在判定
183+ public static function ExistsWishRole($role) {
184+ return ArrayFilter::IsInclude(self::GetWishRoleList(), $role);
185+ }
186+
182187 //-- private --//
183188 //オプションロード可能判定
184189 private static function CanLoad($option) {
Show on old repository browser