contrib login app
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
contribsdk
README.md
index.php
logout.php

README.md

contrib-login-app

contrib login app

how to use class

include 'contribsdk/contribclient.php';
//get api key from http://developers.contrib.com/
$api_key = 'xxxxxxxx';
$client = new ContribClient($api_key);

class functions

$client->isLoggedIn() - checks if user is already logged in
$client->LoginUrl('http://localhost/contrib/index.php','http://localhost/') - get contrib login URL, pass redirect and cancel url
$client->logout('http://localhost/contrib/index.php') - logout user from contrib, pass redirect url - url to be redirected after logout $client->getUser() - get user information function
returns array():
array (size=2)
'success' => boolean false
'data' =>
 array (size=2)
  'success' => boolean true
  'info' =>
  array (size=6)
   'userid' => ''
   'email' => ''
   'username' => ''
   'first_name' => ''
   'last_name' => ''
   'image' => ''

reference links

documentation - http://developers.contrib.com/opensource
sample - http://www.referrals.com