1
0
Fork 0

Add no_update flag to speed up Contact::getIdForURL instances

This commit is contained in:
Hypolite Petovan 2018-03-01 19:54:45 -05:00
commit 41678ec3cd
5 changed files with 7 additions and 7 deletions

View file

@ -925,10 +925,10 @@ function public_contact()
if (!$public_contact_id && x($_SESSION, 'authenticated')) {
if (x($_SESSION, 'my_address')) {
// Local user
$public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0));
$public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, true));
} elseif (x($_SESSION, 'visitor_home')) {
// Remote user
$public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0));
$public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, true));
}
} elseif (!x($_SESSION, 'authenticated')) {
$public_contact_id = false;