// Check if we have a non-canonical URL
- $finalUrl = $response->getUrl();
+ $finalUrl = $response->getEffectiveUrl();
if ($finalUrl != $profile_url) {
$hints['profileurl'] = $finalUrl;
function pullOstatusProfile($uri) {
$oprofile = null;
+ $validate = new Validate();
- if (Validate::email($uri)) {
+ if ($validate->email($uri)) {
$oprofile = LooseOstatusProfile::updateWebfinger($uri);
- } else if (Validate::uri($uri)) {
+ } else if ($validate->uri($uri)) {
$oprofile = LooseOstatusProfile::updateProfileURL($uri);
} else {
print "Sorry, we could not reach the address: $uri\n";