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

Can't login with NAVER #4

Closed
Joungkyun opened this issue May 4, 2018 · 0 comments
Closed

Can't login with NAVER #4

Joungkyun opened this issue May 4, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@Joungkyun
Copy link
Member

Environments :

  • Product Version : 1.0.6 and all
  • Client OS : PHP 7.0 and after

Expected :

login success

Actually :

login failed.

Failed get User profile of NAVER

method of represent :

<?php

$data = <<<EOL
<?xml version="1.0" encoding="UTF-8" ?><data><result><resultcode>00</resultcode><message>success</message></result><response><id><![CDATA[12346962]]></id><nickname><![CDATA[닉네임]]></nickname><enc_id><![CDATA[a5ca5ad1d3abb05714e5828457120221d52de3a45e9ade8c1be0febe1e3fa6ac7]]></enc_id><profile_image>https://phinf.pstatic.net/contact/20160112_241/1516220456777HUYSv_JPEG/image.jpg</profile_image><age><![CDATA[20-29]]></age><gender>M</gender><email><![CDATA[[email protected]]]></email><name><![CDATA[이름]]></name><birthday><![CDATA[02-29]]></birthday></response></data>
EOL;

$xml = simplexml_load_string ($data);
$xmlr =  $xml->response;

$rname = (string) $xmlr->name->{0};
$nname = (string) $xmlr->nickname->{0};
$name = $rname ? $rname : $nname;

$r = array (
    'id'       => (string) $xmlr->enc_id->{0},
    'realname' => $rname,
    'nickname' => $nname,
    'name'     => $name,
    'email'    => (string) $xmlr->email->{0},
    'gender'   => (string) $xmlr->gender->{0},
    'age'      => (string) $xmlr->age->{0},
    'birth'    => (string) $xmlr->birthday,
    'img'      => (string) $xmlr->profile_image
);

print_r ($r);
?>

As of PHP 7, the value of all members is empty except the birth and img members.

@Joungkyun Joungkyun self-assigned this May 4, 2018
@Joungkyun Joungkyun added this to the 1.0.7 milestone May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant