Last active
June 15, 2016 07:11
-
-
Save WietseWind/ba342cffa41027b9c3e13e2ac5d61945 to your computer and use it in GitHub Desktop.
nodum.io - Social Profiles with nodum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% do twig.noTemplate().addHeader('Content-type: application/json;') %} | |
{% trim %} | |
{% if socialprofile.getConnectedProviders %} | |
{% set profiles = [] %} | |
{% for p in socialprofile.getConnectedProviders %} | |
{% set profiles = profiles|merge({ (p) : socialprofile.getProfile(p) }) %} | |
{% endfor %} | |
{{ { | |
msg : 'hasProviders', | |
validAuth: true, | |
providers: socialprofile.getConnectedProviders, | |
profiles: profiles | |
}|json_encode }} | |
{% else %} | |
{{ { msg : 'noProviders', validAuth: false }|json_encode }} | |
{% endif %} | |
{% endtrim %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment