Skip to content

DevelopersContrib/contrib-login-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages