add labels for the logger parameters
This commit is contained in:
parent
33c9d17bdb
commit
a9265220af
|
@ -54,7 +54,7 @@ class CheckRelMeProfileLink
|
||||||
*/
|
*/
|
||||||
public static function execute(int $uid)
|
public static function execute(int $uid)
|
||||||
{
|
{
|
||||||
Logger::notice('Verifying the homepage', [$uid]);
|
Logger::notice('Verifying the homepage', ['uid' => $uid]);
|
||||||
Profile::update(['homepage_verified' => false], $uid);
|
Profile::update(['homepage_verified' => false], $uid);
|
||||||
$homepageUrlVerified = false;
|
$homepageUrlVerified = false;
|
||||||
$owner = User::getOwnerDataById($uid);
|
$owner = User::getOwnerDataById($uid);
|
||||||
|
@ -64,7 +64,7 @@ class CheckRelMeProfileLink
|
||||||
if ($curlResult->isSuccess()) {
|
if ($curlResult->isSuccess()) {
|
||||||
$content = $curlResult->getBody();
|
$content = $curlResult->getBody();
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
Logger::notice('Empty body of the fetched homepage link). Cannot verify the relation to profile of UID %s.', [$uid, $owner['homepage']]);
|
Logger::notice('Empty body of the fetched homepage link). Cannot verify the relation to profile of UID %s.', ['uid' => $uid, 'owner homepage' => $owner['homepage']]);
|
||||||
} else {
|
} else {
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
$doc->loadHTML($content);
|
$doc->loadHTML($content);
|
||||||
|
@ -83,16 +83,16 @@ class CheckRelMeProfileLink
|
||||||
}
|
}
|
||||||
if ($homepageUrlVerified) {
|
if ($homepageUrlVerified) {
|
||||||
Profile::update(['homepage_verified' => true], $uid);
|
Profile::update(['homepage_verified' => true], $uid);
|
||||||
Logger::notice('Homepage URL verified', [$uid, $owner['homepage']]);
|
Logger::notice('Homepage URL verified', ['uid' => $uid, 'owner homepage' => $owner['homepage']]);
|
||||||
} else {
|
} else {
|
||||||
Logger::notice('Homepage URL could not be verified', [$uid, $owner['homepage']]);
|
Logger::notice('Homepage URL could not be verified', ['uid' => $uid, 'owner homepage' => $owner['homepage']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger::notice('Could not cURL the homepage URL', [$owner['homepage']]);
|
Logger::notice('Could not cURL the homepage URL', ['owner homepage' => $owner['homepage']]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger::notice('The user has no homepage link.', [$uid]);
|
Logger::notice('The user has no homepage link.', ['uid' => $uid]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user