Skip to content

Commit 59c7939

Browse files
committed
Update hybridauth to the latest (3.2.0)
1 parent 24c7957 commit 59c7939

File tree

4 files changed

+20
-29
lines changed

4 files changed

+20
-29
lines changed

server/actions/account/login.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,16 @@ public function execute() {
3131
function tryLogin($type) {
3232
$session = new \core\Session($this->db, SESSION_NAME);
3333
$exception = null;
34+
$adapter = null;
3435

3536
$auth = new \core\Authentication();
3637
try {
3738
$adapter = $auth->connect($type);
38-
39-
if (!$adapter->isConnected()) {
40-
$adapter->authenticate();
41-
}
4239
} catch (\Exception $ex) {
4340
$exception = $ex;
4441
}
4542

46-
if ($adapter->isConnected()) {
43+
if (!is_null($adapter) && $adapter->isConnected()) {
4744
$userProfile = null;
4845

4946
try {

server/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
33
"respect/validation": "1.1.12",
4-
"hybridauth/hybridauth": "v3.0.0-rc.9"
4+
"hybridauth/hybridauth": "v3.2.0"
55
},
66
"require-dev": {
77
}

server/composer.lock

+16-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/core/Authentication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function connect($type) {
6565

6666
if (function_exists("curl_init")) {
6767
$auth = new \Hybridauth\Hybridauth($config);
68-
return $auth->getAdapter($type);
68+
return $auth->authenticate($type);
6969
} else {
7070
throw new \core\APIError(\core\ErrorCodes::API_MISSING_REQUIREMENTS, "curl is required for login.");
7171
}

0 commit comments

Comments
 (0)