mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Define list of valid status codes as Member::STATUS_LIST
This commit is contained in:
parent
26a0ec66ff
commit
b74a8db75b
2 changed files with 4 additions and 6 deletions
|
|
@ -106,14 +106,11 @@ class MemberAdminController extends Member
|
|||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
// Normalize denied and status columns
|
||||
if ($args->status === 'APPROVED')
|
||||
if (!in_array($args->status ?? '', self::STATUS_LIST))
|
||||
{
|
||||
$args->denied = 'N';
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->denied = 'Y';
|
||||
$args->status = 'APPROVED';
|
||||
}
|
||||
$args->denied = ($args->status === 'APPROVED') ? 'N' : 'Y';
|
||||
|
||||
// Delete invalid or past limit dates #1334
|
||||
if (!isset($args->limit_date))
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class Member extends ModuleObject
|
|||
*/
|
||||
public const ADMIN_EXTRA_VARS = ['refused_reason', 'limited_reason'];
|
||||
public const NOUSE_EXTRA_VARS = ['error_return_url', 'success_return_url', '_rx_ajax_compat', '_rx_csrf_token', 'ruleset', 'captchaType', 'use_editor', 'use_html'];
|
||||
public const STATUS_LIST = ['APPROVED', 'DENIED', 'UNAUTHED', 'SUSPENDED', 'DELETED'];
|
||||
|
||||
/**
|
||||
* constructor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue