журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[livejournal] r22350: LJSUP-12638: XML RPC login: identity acc...

Committer: nnikulochkina
LJSUP-12638: XML RPC login: identity account support
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-06-29 07:53:37 UTC (rev 22349)
+++ trunk/cgi-bin/ljprotocol.pl	2012-06-29 08:06:27 UTC (rev 22350)
@@ -1726,6 +1726,19 @@
     $res->{'fullname'} = $uowner->{'name'};
     LJ::text_out(\$res->{'fullname'}) if $ver >= 1;
 
+    # Identity info 
+    if ($uowner->is_identity){
+        my $i = $uowner->identity;
+        $res->{'identity_type'}    = $i->pretty_type;
+        $res->{'identity_value'}   = $i->value;
+        $res->{'identity_url'}     = $i->url($uowner);
+        $res->{'identity_display'} = $uowner->display_name;
+    } else {
+        foreach (qw(identity_display identity_url identity_value identity_type)) {
+            $res->{$_} = '';
+        }
+    }
+
     if ($req->{'clientversion'} =~ /^\S+\/\S+$/) {
         eval {
             LJ::Request->notes("clientver", $req->{'clientversion'});

Tags: livejournal, nikulochkina, nnikulochkina, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments