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
-
Notifications
You must be signed in to change notification settings - Fork 0
DevelopersContrib/contrib-login-app
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
contrib login app
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published