mirror of
https://github.com/friendica/friendica
synced 2024-11-09 15:42:55 +00:00
api_get_user() should not return false right away if the number in the URL is not a valid user
This commit is contained in:
parent
799bd75fb2
commit
f3d98b2864
1 changed files with 6 additions and 8 deletions
|
@ -577,14 +577,12 @@ function api_get_user(App $a, $contact_id = null)
|
|||
if (is_numeric($user)) {
|
||||
$user = dbesc(api_unique_id_to_nurl(intval($user)));
|
||||
|
||||
if ($user == "") {
|
||||
return false;
|
||||
}
|
||||
|
||||
$url = $user;
|
||||
$extra_query = "AND `contact`.`nurl` = '%s' ";
|
||||
if (api_user() !== false) {
|
||||
$extra_query .= "AND `contact`.`uid`=" . intval(api_user());
|
||||
if ($user != "") {
|
||||
$url = $user;
|
||||
$extra_query = "AND `contact`.`nurl` = '%s' ";
|
||||
if (api_user() !== false) {
|
||||
$extra_query .= "AND `contact`.`uid`=" . intval(api_user());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$user = dbesc($user);
|
||||
|
|
Loading…
Reference in a new issue