웹프로그래밍

Global It Leader!!


그누보드


 
 

SNS 네이버로그인시 전화번호 가져오기

페이지 정보

작성자 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 85회 작성일 24-03-22 17:31

본문

네이버로그인api 전화번호가져오기가 체크되있어도

그누에 mobile 값이 없어서 전화번호를 가져오지 하는데..

그 값만 추가하면 전화번호를 가져와서 공유합니다.

 

1] 첫번째

 

plugin/social/Hybrid/Providers/Naver.php

 

검색

$this->user->profile->username = (array_key_exists('name', $data)) ? $data['name'] : "";

 

하단 추가

$this->user->profile->mobile = (array_key_exists('mobile', $data)) ? $data['mobile'] : "";

 

예시)

$this->user->profile->username = (array_key_exists('name', $data)) ? $data['name'] : "";
$this->user->profile->mobile = (array_key_exists('mobile', $data)) ? $data['mobile'] : "";

 

 

2] 두번째

 

plugin/social/register_member.php

 

검색

$user_name = isset($user_profile->username) ? $user_profile->username : ''; 

 

하단 추가

$user_mobile = isset($user_profile->mobile) ? $user_profile->mobile : ''; 

 

예시)

$user_name = isset($user_profile->username) ? $user_profile->username : ''; 
$user_mobile = isset($user_profile->mobile) ? $user_profile->mobile : ''; 

 

 

3] 세번째 

 

skin/social/social_register_member.php

 

검색

 <tr>
            <th scope="row"><label for="reg_mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
            <td>
                <input type="text" name="mb_email" value="<?php echo isset($user_email)?$user_email:''; ?>" id="reg_mb_email" required class="frm_input email required" size="70" maxlength="100" placeholder="이메일을 입력해주세요." >
                <p class="email_msg"><?php echo $email_msg; ?></p>
            </td>
        </tr>

 

 

하단추가

네이버 인증하고 확인시 나오는 화면입니다.

전화번호를 노출하고 싶으시면  하단내용을 추가하면

 

<tr>
            <th scope="row"><label for="mb_hp">mb_hp<strong class="sound_only">필수</strong></label></th>
            <td>
                <input type="text" name="mb_hp" value="<?php echo isset($user_mobile)?$user_mobile:''; ?>" id="mb_hp" required class="frm_input" size="70" maxlength="100" placeholder="전화번호를 입력해주세요." >

            </td>
        </tr>

 

247511fff30693487b95ac86ef50faed_1711096257_83.png
 

 

 

이런 화면에 전화번호칸이 노출이됩니다.  노출을 원하시지않으시면

 

검색 ]

<input type="text" name="mb_email" value="<?php echo isset($user_email)?$user_email:''; ?>" id="reg_mb_email" required class="frm_input email required" size="70" maxlength="100" placeholder="이메일을 입력해주세요." >

 

하단추가

<input type="hidden" name="mb_hp" value="<?php echo isset($user_mobile)?$user_mobile:''; ?>">

 

위에 코드를 넣어주시면 노출은 되지않습니다.

 

 

 

4] 네번째

 

plugin/social/register_member_update.php

 

검색

$mb_email       = get_email_address($mb_email);

 

하단 추가

$mb_hp          = isset($_POST['mb_hp']) ? trim($_POST['mb_hp']) : "";

 

 

검색

mb_email = '{$mb_email}',

 

하단 추가

mb_hp = '{$mb_hp}',

 

 

전화번호가 추가됩니다.

 

댓글목록

등록된 댓글이 없습니다.

전체 63
게시물 검색
그누보드 목록
번호 제목 글쓴이 조회 날짜
63 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3 04-26
62 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4 04-26
61 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4 04-26
60 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4 04-26
59 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 101 03-22
열람중 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 86 03-22
57 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 177 01-12
56 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 194 01-11
55 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 171 01-11
54 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 308 10-29
53 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 418 09-14
52 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 453 08-21
51 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 449 08-06
50 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 411 08-05
49 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2080 03-22
48 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1351 03-22
47 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4764 08-09
46 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1947 07-22
45 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 4076 07-16
44 no_profile 운영자 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2225 06-28