mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Fix unnecessary error in procMemberModifyInfo() when profile image is required
https://xetown.com/questions/1822660
This commit is contained in:
parent
18ffca5df7
commit
960f42a105
1 changed files with 12 additions and 3 deletions
|
|
@ -1028,7 +1028,15 @@ class MemberController extends Member
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check all required fields
|
// Check all required fields
|
||||||
$output = $this->_checkSignUpFields($config, $args, 'update');
|
$skip = [];
|
||||||
|
foreach (['profile_image', 'image_name', 'image_mark'] as $key)
|
||||||
|
{
|
||||||
|
if (!empty($logged_info->{$key}))
|
||||||
|
{
|
||||||
|
$skip[] = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$output = $this->_checkSignUpFields($config, $args, 'update', $skip);
|
||||||
if (!$output->toBool())
|
if (!$output->toBool())
|
||||||
{
|
{
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -4051,9 +4059,10 @@ class MemberController extends Member
|
||||||
* @param object $config
|
* @param object $config
|
||||||
* @param object $args
|
* @param object $args
|
||||||
* @param string $mode
|
* @param string $mode
|
||||||
|
* @param array $skip
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
protected function _checkSignUpFields($config, $args, $mode = 'insert')
|
protected function _checkSignUpFields($config, $args, $mode = 'insert', $skip = [])
|
||||||
{
|
{
|
||||||
$not_required_if_indirect_insert = ['user_id'];
|
$not_required_if_indirect_insert = ['user_id'];
|
||||||
$not_required_in_update = ['password'];
|
$not_required_in_update = ['password'];
|
||||||
|
|
@ -4071,7 +4080,7 @@ class MemberController extends Member
|
||||||
{
|
{
|
||||||
// pass
|
// pass
|
||||||
}
|
}
|
||||||
else
|
elseif (!in_array($formInfo->name, $skip))
|
||||||
{
|
{
|
||||||
return new BaseObject(-1, sprintf(lang('common.filter.isnull'), $formInfo->title));
|
return new BaseObject(-1, sprintf(lang('common.filter.isnull'), $formInfo->title));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue