set the validation to false, and only set it to true if we were able to verify the link
This commit is contained in:
parent
64f290a055
commit
fb04eb107b
|
@ -55,6 +55,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]);
|
||||||
|
Profile::update(['homepage_verified' => false], $uid);
|
||||||
$homepageUrlVerified = false;
|
$homepageUrlVerified = false;
|
||||||
$owner = User::getOwnerDataById($uid);
|
$owner = User::getOwnerDataById($uid);
|
||||||
if (!empty($owner['homepage'])) {
|
if (!empty($owner['homepage'])) {
|
||||||
|
@ -86,14 +87,12 @@ class CheckRelMeProfileLink
|
||||||
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, $owner['homepage']]);
|
||||||
} else {
|
} else {
|
||||||
Profile::update(['homepage_verified' => false], $uid);
|
|
||||||
Logger::notice('Homepage URL could not be verified', [$uid, $owner['homepage']]);
|
Logger::notice('Homepage URL could not be verified', [$uid, $owner['homepage']]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Logger::notice('The user has no homepage link.', [$uid]);
|
Logger::notice('The user has no homepage link.', [$uid]);
|
||||||
Profile::update(['homepage_verified' => false], $uid);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user