회원정보 수정
회원정보 수정 페이지 만들기에 관해 설명합니다.
Data ID
MODIFY_USER
Request
Name | Value |
---|---|
token | 회원인증 후 get parameter로 수신한 인증토큰(만료시간:10분) |
return_url | 정보 수정 완료 후 이동할 URL |
fail_redirect_url | 로그인이 되지 않은 상태로 접근 시 이동할 URL |
my_notice_limit | 나의 알림가져올 개수 |
page | 나의 알림 페이지 번호 |
block_number | 나의 알림 페이지 표시 개수 |
my_post_list_flg | 내가 작성한 게시글 목록 가저오기 여부 : Y 또는 설정안함 |
my_post_list_limit | 내가 작성한 게시글 목록을 가져올 개수 |
my_notice_flg | 나의 알림 가져오기 여부 : Y 또는 설정안함 |
post_responder_flg | 나의 글에 반응한 사람 목록 가져오기 여부 : Y 또는 설정안함 |
post_responder_limit | 나의 알림가져올 개수 |
Response
JSON : output.member[0], PHP : $output['member'][0]
Name | Value |
---|---|
avatar_url | 아바타 URL |
birth_d | 생일 |
birth_m | 생월 |
birth_y | 생년 |
cell_phone | 회원 휴대전화 번호 |
create_date | 회원 가입일 |
nickname | 닉네임 |
name | 이름 |
level | 회원 Level |
receive_agree_date | 소식 및 정보 수신 동의 일시 |
receive_message_flg | 소식 및 정보 수신(Y 또는 N) |
seq | 회원 시퀀스 |
member_post_count | 회원이 작성한 게시물 수 |
member_comment_count | 회원이 응답한 코멘트 수 |
member_like_count | 회원이 보낸 좋아요 수 |
HTML attributes
Tag : form
Name | Value | Description |
---|---|---|
method | post | Form method |
id | frm_member | Form id |
HTML elements
Name | Value |
---|---|
token | 회원인증 후 get parameter로 수신한 인증토큰(만료시간:10분) |
auth_expire_url | 인증토큰 만료시 이동할 URL |
return_url | 정보 저장 후 Redirect URL(미 입력시 사이트 인덱스) |
사용자 이메일 | |
cell_phone | 휴대전화 |
name | 사용자 이름 |
nickname | 닉네임 |
avatar_url | 아바타 URL |
birth_y | 생일(년) |
birth_m | 생일(월) |
birth_d | 생일(일) |
receive_message | 소식 및 정보등의 수신 동의 : Y(동의)/N(미동의) |
VueJS
<div class="container">
<div class="row">
<div class="col-12 mb-5">
<div class="px-lg-4 mb-5">
<!-- USER PROFILE START -->
<div class="mb-3 row rounded-3 py-3">
<div class="col-12 col-md-12 col-lg-auto mb-3 mb-sm-0 d-flex justify-content-center align-items-center">
<div class="mx-4" style="width:6rem;">
<img colon:src="output.user.avatar_url" class="img-fluid">
</div>
</div><!-- media-img -->
<div class="w-100 my-2 ps-3 py-3 me-4 rounded-3 col-12 col-md-12 col-lg media-body d-flex flex-column align-items-start justify-content-center">
<div class="w-100 text-center text-lg-start d-flex align-items-center justify-content-start">
<h4>
\{\{output.user.nickname}}
</h4>
<small class="d-block my-2 ms-2">(\{\{output.user.name}})</small>
</div>
<div class="w-100 mt-2 row row-cols-sm-auto justify-content-center justify-content-lg-start">
<div class="col-6 col-sm-3">
<span class="w-100 mt-2 badge text-white rounded-pill bg-secondary">Level : \{\{output.member[0].level.toLocaleString()}}</span>
</div>
<div class="col-6 col-sm-3">
<span class="w-100 mt-2 badge text-white rounded-pill bg-secondary">Post : \{\{output.member_post_count ? output.member_post_count.toLocaleString() : 0}}</span>
</div>
<div class="col-6 col-sm-3">
<span class="ms-3 mt-2 badge text-white rounded-pill bg-secondary">Comment : \{\{output.member_comment_count ? output.member_comment_count.toLocaleString() : 0}}</span>
</div>
<div class="col-6 col-sm-3">
<span class="ms-3 mt-2 badge text-white rounded-pill bg-secondary">Like : \{\{output.member_like_count ? output.member_like_count.toLocaleString() : 0}}</span>
</div>
</div>
</div>
</div>
<!-- USER PROFILE START -->
<!-- MODIFY FORM START -->
<form id="frm_member" class="my-5">
<input type="hidden" name="return_url" id="return_url" value="/mypage/view"/>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>이메일</h6>
<p class="small mb-0">사용하시는 이메일 주소를 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="email" :value="output.member[0].email" class="form-control" data-validation="email" data-validation-type="replace" id="email" name="email" placeholder="이메일을 입력하세요" data-gtm-form-interact-field-id="0">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>휴대전화</h6>
<p class="small mb-0">휴대전화번호를 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" :value="output.member[0].cell_phone" class="form-control" data-validation="number" data-validation-type="replace" id="cell_phone" name="cell_phone" placeholder="휴대전화 번호를 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>이름</h6>
<p class="small mb-0">이름을 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" :value="output.member[0].name" class="form-control" data-validation="not-empty" id="name" name="name" placeholder="이름을 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>닉네임</h6>
<p class="small mb-0">포럼 등에서 사용할 닉네임을 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" :value="output.member[0].nickname" class="form-control" data-validation="not-empty" id="nickname" name="nickname" placeholder="닉네임을 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>아바타</h6>
<p class="small mb-0">프로필 아바타를 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="d-flex flex-wrap justify-content-start align-items-center">
<? foreach ($arrAvatar as $intKey => $strResult) { ?>
<div class="me-2 my-1 text-center">
<label class="form-check-label avatar avatar-lg" for="avatar_<?= $intKey + 1; ?>"><img src="<?= $strResult; ?>"/></label>
<input class="" type="radio" id="avatar_<?= $intKey + 1; ?>" name="avatar_url" value="<?= $strResult; ?>" :checked="output.member[0].avatar_url=='<?=$strResult;?>'">
</div>
<? } ?>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>생일</h6>
<p class="small mb-0">생일을 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="row">
<div class="col">
<label for="birth_y" class="form-label visually-hidden">생일(년)</label>
<select class="form-select" id="birth_y" name="birth_y" data-validation="not-empty">
<option value="">년도 선택</option>
<? for ($y = date('Y'); $y > date('Y') - 80; $y--) { ?>
<option value="<?= $y; ?>" :selected="output.member[0].birth_y == <?=$y;?>"><?= $y; ?>년</option>
<? } ?>
</select>
</div>
<div class="col">
<label for="birth_m" class="form-label visually-hidden">생일(월)</label>
<select class="form-select" id="birth_m" name="birth_m" data-validation="not-empty">
<option value="" selected="selected">월 선택</option>
<? for ($m = 1; $m < 13; $m++) { ?>
<option value="<?= $m; ?>" :selected="output.member[0].birth_m == <?=$m;?>"><?= $m; ?>월</option>
<? } ?>
</select>
</div>
<div class="col">
<label for="birth_d" class="form-label visually-hidden">생일(일)</label>
<select class="form-select" id="birth_d" name="birth_d" data-validation="not-empty">
<option value="" selected="selected">일 선택</option>
<? for ($d = 1; $d < 32; $d++) { ?>
<option value="<?= $d; ?>" :selected="output.member[0].birth_d == <?=$d;?>"><?= $d; ?>일</option>
<? } ?>
</select>
</div>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>소식 및 정보 수신</h6>
<p class="small mb-0">소식 및 정보 수신 여부를 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="form-group has-validation">
<div class="form-check lh-base mt-3">
<input class="form-check-input" type="checkbox" id="receive_message_flg" name="receive_message_flg" value="Y" :checked="output.member[0].receive_message_flg=='Y'"><label class="form-check-label" for="receive_message_flg">소식 및 정보등의 수신 동의.</label>
</div>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="my-5 text-center">
<div class="my-4 text-center mb-5">
<button type="submit" class="mx-1 btn border-hbnc-primary bg-hanbnc-primary-3 border border-3 px-4">확인</button>
<a href="/console/profile/" class="mx-1 btn border-gray-default-op-50 bg-gray-light border border-3 px-4">취소</a>
</div>
</div>
</form>
<!-- MODIFY FORM END -->
</div>
</div>
</div>
</div>
PHP
<div class="container">
<div class="row">
<div class="col-12 col-lg-9 border-md-end-none border-end mb-5">
<div class="px-lg-4 mb-5">
<!-- USER PROFILE START -->
<div class="mb-3 row rounded-3 py-3">
<div class="col-12 col-md-12 col-lg-auto mb-3 mb-sm-0 d-flex justify-content-center align-items-center">
<div class="mx-4" style="width:6rem;">
<img src="<?=$output['member'][0]['avatar_url'];?>" class="img-fluid">
</div>
</div><!-- media-img -->
<div class="w-100 my-2 ps-3 py-3 me-4 rounded-3 col-12 col-md-12 col-lg media-body d-flex flex-column align-items-start justify-content-center">
<div class="w-100 text-center text-lg-start d-flex align-items-center justify-content-start">
<h4>
<?=$output['member'][0]['nickname'];?>
</h4>
<small class="d-block my-2 ms-2">(<?=$output['member'][0]['name'];?>)</small>
</div>
<div class="w-100 mt-2 row row-cols-sm-auto justify-content-center justify-content-lg-start">
<div class="col-6 col-sm-3">
<span class="w-100 mt-2 badge text-white rounded-pill bg-secondary">Level : <?=number_format($output['member'][0]['level']);?></span>
</div>
<div class="col-6 col-sm-3">
<span class="w-100 mt-2 badge text-white rounded-pill bg-secondary">Post : <?=number_format($output['member'][0]['member_post_count']);?></span>
</div>
<div class="col-6 col-sm-3">
<span class="ms-3 mt-2 badge text-white rounded-pill bg-secondary">Comment : <?=number_format($output['member'][0]['member_comment_count']);?></span>
</div>
<div class="col-6 col-sm-3">
<span class="ms-3 mt-2 badge text-white rounded-pill bg-secondary">Like : <?=number_format($output['member'][0]['member_like_count']);?></span>
</div>
</div>
</div>
</div>
<!-- USER PROFILE END -->
<!-- MODIFY FORM START-->
<form id="frm_member" class="my-5">
<input type="hidden" name="return_url" id="return_url" value="/mypage/view"/>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>이메일</h6>
<p class="small mb-0">사용하시는 이메일 주소를 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="email" value="<?=$output['member'][0]['email'];?>" class="form-control" data-validation="email" data-validation-type="replace" id="email" name="email" placeholder="이메일을 입력하세요" data-gtm-form-interact-field-id="0">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>휴대전화</h6>
<p class="small mb-0">휴대전화번호를 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" value="<?=$output['member'][0]['cell_phone'];?>" class="form-control" data-validation="number" data-validation-type="replace" id="cell_phone" name="cell_phone" placeholder="휴대전화 번호를 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>이름</h6>
<p class="small mb-0">이름을 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" value="<?=$output['member'][0]['name'];?>" class="form-control" data-validation="not-empty" id="name" name="name" placeholder="이름을 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>닉네임</h6>
<p class="small mb-0">포럼 등에서 사용할 닉네임을 입력하세요.</p>
</div><!-- col -->
<div class="col-md">
<input type="text" value="<?=$output['member'][0]['nickname'];?>" class="form-control" data-validation="not-empty" id="nickname" name="nickname" placeholder="닉네임을 입력하세요">
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>아바타</h6>
<p class="small mb-0">프로필 아바타를 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="d-flex flex-wrap justify-content-start align-items-center">
<? foreach ($arrAvatar as $intKey => $strResult) { ?>
<div class="me-2 my-1 text-center">
<label class="form-check-label avatar avatar-lg" for="avatar_<?= $intKey + 1; ?>"><img src="<?= $strResult; ?>"/></label>
<input class="" type="radio" id="avatar_<?= $intKey + 1; ?>" name="avatar_url" value="<?= $strResult; ?>" <? if($output['member'][0]['avatar_url']==$strResult){ ?>checked="checked"<? } ?>>
</div>
<? } ?>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>생일</h6>
<p class="small mb-0">생일을 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="row">
<div class="col">
<label for="birth_y" class="form-label visually-hidden">생일(년)</label>
<select class="form-select" id="birth_y" name="birth_y" data-validation="not-empty">
<option value="">년도 선택</option>
<? for ($y = date('Y'); $y > date('Y') - 80; $y--) { ?>
<option value="<?= $y; ?>" <? if($output['member'][0]['birth_y']==$y){ ?>selected="selected"<? } ?>><?= $y; ?>년</option>
<? } ?>
</select>
</div>
<div class="col">
<label for="birth_m" class="form-label visually-hidden">생일(월)</label>
<select class="form-select" id="birth_m" name="birth_m" data-validation="not-empty">
<option value="" selected="selected">월 선택</option>
<? for ($m = 1; $m < 13; $m++) { ?>
<option value="<?= $m; ?>" <? if($output['member'][0]['birth_m']==$m){ ?>selected="selected"<? } ?>><?= $m; ?>월</option>
<? } ?>
</select>
</div>
<div class="col">
<label for="birth_d" class="form-label visually-hidden">생일(일)</label>
<select class="form-select" id="birth_d" name="birth_d" data-validation="not-empty">
<option value="" selected="selected">일 선택</option>
<? for ($d = 1; $d < 32; $d++) { ?>
<option value="<?= $d; ?>" <? if($output['member'][0]['birth_d']==$d){ ?>selected="selected"<? } ?>><?= $d; ?>일</option>
<? } ?>
</select>
</div>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="setting-item">
<div class="row g-2 align-items-center">
<div class="col-md-5">
<h6>소식 및 정보 수신</h6>
<p class="small mb-0">소식 및 정보 수신 여부를 선택하세요.</p>
</div><!-- col -->
<div class="col-md">
<div class="form-group has-validation">
<div class="form-check lh-base mt-3">
<input class="form-check-input" type="checkbox" id="receive_message_flg" name="receive_message_flg" value="Y" <? if($output['member'][0]['receive_message_flg']){ ?>checked="checked"<? } ?>><label class="form-check-label" for="receive_message_flg">소식 및 정보등의 수신 동의.</label>
</div>
</div>
</div><!-- col -->
</div><!-- row -->
</div>
<div class="my-5 text-center">
<div class="my-4 text-center mb-5">
<button type="submit" class="mx-1 btn border-hbnc-primary bg-hanbnc-primary-3 border border-3 px-4">확인</button>
<a href="/console/profile/" class="mx-1 btn border-gray-default-op-50 bg-gray-light border border-3 px-4">취소</a>
</div>
</div>
</form>
<!-- MODIFY FORM END -->
</div>
</div>
</div>
</div>
Response After Submission
저장 버튼 클릭시 회원정보 저장 후 return_url로 이동합니다.