Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

알림센터에서 회원메뉴표시를 "사용"으로 해야 관리자가 다른 회원들의 알림설정을 변경할수 있음 #1925

Closed
Erictoby opened this issue Apr 5, 2022 · 2 comments
Labels
cleanup 정리

Comments

@Erictoby
Copy link
Contributor

Erictoby commented Apr 5, 2022

관리자 페이지 / 설치된 모듈 / 알림센터 / "회원알림설정"을 "사용"으로, "회원 메뉴 표시"를 "표시하지 않음"으로 선택하면, 관리자가 각 회원 이름을 클릭하면 뜨는 팝업메뉴에 "사용자 알림설정" 항목이 나오지 않는 현상이 있습니다. 이유를 찾아보니까,

if($config->user_config_list == 'Y')
{
$logged_info = Context::get('logged_info');
if(!Context::get('is_logged'))
{
return;
}
$target_srl = Context::get('target_srl');
$oMemberController->addMemberMenu('dispNcenterliteNotifyList', 'ncenterlite_my_list');
if($config->unsubscribe == 'Y')
{
$oMemberController->addMemberMenu('dispNcenterliteUnsubscribeList', 'unsubscribe_list');
}
}
if($config->user_notify_setting == 'Y')
{
$oMemberController->addMemberMenu('dispNcenterliteUserConfig', 'ncenterlite_my_settings');
if($logged_info->is_admin == 'Y')
{
$url = getUrl('', 'act', 'dispNcenterliteUserConfig', 'member_srl', $target_srl);
$str = Context::getLang('ncenterlite_user_settings');
$oMemberController->addMemberPopupMenu($url, $str, '');
}
}

에서 $logged_info $target_srlif($config->user_config_list == 'Y') { } 내부에 있다보니까, $config->user_config_list == 'N' 일 경우에는 그 다음의 if($config->user_notify_setting == 'Y') { } 에서는 undefined가 되어 관리자에게 "사용자 알림설정" 팝업메뉴 항목이 추가되지 않는 것 같습니다.

@kijin
Copy link
Member

kijin commented Apr 5, 2022

메뉴를 "표시하지 않음"으로 설정했다면 표시되지 않는 것이 정상으로 보입니다.

코드 구조가 이상하게 되어 있는 것은 사실이지만, 결과적으로는 의도에 맞게 작동하고 있는 것이 아닐까요? 관리자가 다른 회원의 알림 설정을 변경할 수 있도록 지원하는 것이 오히려 비정상이 아닌가, 그리고 그 두 설정의 역할과 의미가 영 직관적이지 않은 상태로 꼬여 있지 않나 하는 생각이 드는데요. 어떻게 생각하시는지요?

@Erictoby
Copy link
Contributor Author

Erictoby commented Apr 5, 2022

메뉴는 "표시하지 않음" + 개별 설정은 "사용" 으로 되어 있을때 발생하는 것이니까, "메뉴를 사용 안할 것이면 설정은 왜 하려고"... 생각하는 것도 당연합니다. 사용중이던 것을 Off하고 메일로 바꾸려다보니까 어쩌다 이런 조합이 되었네요. $logged_info$target_srl을 if 문 밖으로 끄집어 내면 될 것 같기도 하고, 아니면 밑에 조건문을 if($config->user_config_list == 'Y' && $config->user_notify_setting == 'Y')로 한다든지요.

PS: 관리자 / 알림센터 / 설정에 "회원 메뉴 표시" 설명이 "각 회원이 알림 설정을 변경할 수 있는 메뉴를 추가합니다." 인데 "각 회원이 알림을 읽을수 있는 메뉴를 추가합니다" 정도가 이해하기 쉬울것 같습니다. 바로 밑의 "회원알림설정"에 있어야 할 설명이 여기에도 똑 같이 있는데, 아마도 예전에 회원메뉴표시와 회원알림설정으로 2개로 분리하면서, 설명은 바꾸지 않아서 이렇게 남아있는 것 아닐까 추측해봅니다~.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 정리
Projects
None yet
Development

No branches or pull requests

2 participants