$oauth1 = new FKOAuth1();
// login with oauth
try {
- list($consumer, $token) = $oauth1->verify_request(OAuthRequest::from_request());
+ $request = OAuthRequest::from_request();
+ list($consumer, $token) = $oauth1->verify_request($request);
if (!is_null($token)) {
$oauth1->loginUser($token->uid);
Addon::callHooks('logged_in', $a->user);
// $called_api is the API path exploded on / and is expected to have at least 2 elements
if (is_null($user) && ($a->argc > (count($called_api) - 1)) && (count($called_api) > 0)) {
$argid = count($called_api);
- list($user, $null) = explode(".", $a->argv[$argid]);
+ if (!empty($a->argv[$argid])) {
+ list($user, $null) = explode(".", $a->argv[$argid]);
+ }
if (is_numeric($user)) {
$user = dbesc(api_unique_id_to_nurl(intval($user)));
$theme_info = dba::selectFirst('user', ['theme'], ['uid' => $ret['uid']]);
if ($theme_info['theme'] === 'frio') {
$schema = PConfig::get($ret['uid'], 'frio', 'schema');
+
if ($schema && ($schema != '---')) {
if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
$schemefile = 'view/theme/frio/schema/'.$schema.'.php';
$owner_record = q("SELECT * FROM `contact` WHERE `uid`= %d AND `self` LIMIT 1", intval(api_user()));
$arr = [];
- $arr['guid'] = get_guid(32);
+ $arr['guid'] = System::createGUID(32);
$arr['uid'] = intval(api_user());
$arr['uri'] = $uri;
$arr['parent-uri'] = $uri;