diff --git a/src/cron/poller/cronManager.php b/src/cron/poller/cronManager.php index 2b914c8c..ce2bbdfe 100755 --- a/src/cron/poller/cronManager.php +++ b/src/cron/poller/cronManager.php @@ -534,14 +534,15 @@ function getDiscussionObjects(){ } for($h=0; $h < count($accts); $h++){ + print_r($accts); ?>
name; $temp['authenticated'] = "true"; if(!isset($temp['loginDisallow'])){ - $temp['loginDisallow'] = "false"; + $temp['loginDisallow'] = $tempApp['accounts'][$open]['loginDisallow']; } if(!isset($temp['color'])){ - //$temp['color'] = "#0066FF"; - $temp['color'] = $tempApp['color']; + $temp['color'] = $tempApp['accounts'][$open]['color']; } if(!isset($temp['uuid'])){ - $temp['uuid'] = uniqid(); + $temp['uuid'] = $tempApp['accounts'][$open]['uuid']; } if($found == "false"){ diff --git a/src/oAuth/instaAccess.php b/src/oAuth/instaAccess.php index 3f2f78d1..8d152471 100755 --- a/src/oAuth/instaAccess.php +++ b/src/oAuth/instaAccess.php @@ -99,14 +99,13 @@ $temp['name'] = $obj['user']['username']; $temp['authenticated'] = "true"; if(!isset($temp['loginDisallow'])){ - $temp['loginDisallow'] = "false"; + $temp['loginDisallow'] = $tempApp['accounts'][$open]['loginDisallow']; } if(!isset($temp['color'])){ - //$temp['color'] = "#F66733"; - $temp['color'] = $tempApp['color']; + $temp['color'] = $tempApp['accounts'][$open]['color']; } if(!isset($temp['uuid'])){ - $temp['uuid'] = uniqid(); + $temp['uuid'] = $tempApp['accounts'][$open]['uuid']; } if($found == "false"){ diff --git a/src/oAuth/linkedinAccess.php b/src/oAuth/linkedinAccess.php index e16f8057..4ad9d30f 100755 --- a/src/oAuth/linkedinAccess.php +++ b/src/oAuth/linkedinAccess.php @@ -160,14 +160,13 @@ function getAccessToken() { $temp['name'] = $user->firstName . " " . $user->lastName; $temp['authenticated'] = "true"; if(!isset($temp['loginDisallow'])){ - $temp['loginDisallow'] = "false"; + $temp['loginDisallow'] = $tempApp['accounts'][$open]['loginDisallow']; } if(!isset($temp['color'])){ - $temp['color'] = $tempApp['color']; - $temp['color'] = "#B33DA5"; + $temp['color'] = $tempApp['accounts'][$open]['color']; } if(!isset($temp['uuid'])){ - $temp['uuid'] = uniqid(); + $temp['uuid'] = $tempApp['accounts'][$open]['uuid']; } if($found == "false"){ diff --git a/src/oAuth/twitterAccess.php b/src/oAuth/twitterAccess.php index a630d718..31442aec 100755 --- a/src/oAuth/twitterAccess.php +++ b/src/oAuth/twitterAccess.php @@ -151,14 +151,13 @@ $temp['name'] = $account->screen_name; $temp['authenticated'] = "true"; if(!isset($temp['loginDisallow'])){ - $temp['loginDisallow'] = "false"; + $temp['loginDisallow'] = $tempApp['accounts'][$open]['loginDisallow']; } if(!isset($temp['color'])){ - //$temp['color'] = "#E32252"; - $temp['color'] = $tempApp['color']; + $temp['color'] = $tempApp['accounts'][$open]['color']; } if(!isset($temp['uuid'])){ - $temp['uuid'] = uniqid(); + $temp['uuid'] = $tempApp['accounts'][$open]['uuid']; } if($found == "false"){ diff --git a/src/rest/v1.0/lib/Credentials.php b/src/rest/v1.0/lib/Credentials.php index 6a194dd0..3b1fae76 100755 --- a/src/rest/v1.0/lib/Credentials.php +++ b/src/rest/v1.0/lib/Credentials.php @@ -284,7 +284,9 @@ public function getAuthCreds(){ "name" => $obj['name'], "image" => $obj['image'], "color" => $obj['color'], - 'expiresAt' => $obj['expiresAt'] + 'expiresAt' => $obj['expiresAt'], + "loginDisallow" => $obj['loginDisallow'], + "authenticated" => $obj['authenticated'] ); }else{ $account = array( @@ -294,7 +296,9 @@ public function getAuthCreds(){ "name" => $obj['name'], "image" => $obj['image'], "color" => $obj['color'], - 'expiresAt' => $obj['expiresAt'] + 'expiresAt' => $obj['expiresAt'], + "loginDisallow" => $obj['loginDisallow'], + "authenticated" => $obj['authenticated'] ); } array_push($returnArr['linkedin'], $account); diff --git a/src/rest/v1.0/lib/Database.php b/src/rest/v1.0/lib/Database.php index 42be3a78..dd4e00bb 100755 --- a/src/rest/v1.0/lib/Database.php +++ b/src/rest/v1.0/lib/Database.php @@ -521,9 +521,12 @@ public function setDisableLogin(){ for($x = 0; $x < count($credObj[$loginObj['param']][0]['accounts']); $x++){ if(isset($credObj[$loginObj['param']][0]['accounts'][$x]['user'])){ if($credObj[$loginObj['param']][0]['accounts'][$x]['user'] == $loginObj['user']){ + print "here"; if($credObj[$loginObj['param']][0]['accounts'][$x]['loginDisallow'] == "true"){ + print "false"; $credObj[$loginObj['param']][0]['accounts'][$x]['loginDisallow'] = "false"; }else{ + print "login"; $credObj[$loginObj['param']][0]['accounts'][$x]['loginDisallow'] = "true"; } break;