use Friendica\Database\DBA;
use Friendica\Model\User;
-require_once 'include/dba.php';
-
class ExAuth
{
private $bDebug;
*/
private function isUser(array $aCommand)
{
- $a = get_app();
+ $a = \get_app();
// Check if there is a username
if (!isset($aCommand[1])) {
$url = ($ssl ? 'https' : 'http') . '://' . $host . '/noscrape/' . $user;
- $data = Network::curl($url);
+ $curlResult = Network::curl($url);
- if (!is_array($data)) {
+ if (!$curlResult->isSuccess()) {
return false;
}
- if ($data['return_code'] != '200') {
+ if ($curlResult->getReturnCode() != 200) {
return false;
}
- $json = @json_decode($data['body']);
+ $json = @json_decode($curlResult->getBody());
if (!is_object($json)) {
return false;
}
*/
private function auth(array $aCommand)
{
- $a = get_app();
+ $a = \get_app();
// check user authentication
if (sizeof($aCommand) != 4) {