// from that page
// we don't really need to set it when $tempID is set because the params have that stored
$this->set('cid', 0);
- return $tempID;
+ return (int) $tempID;
}
$userID = $this->getLoggedInUserContactID();
- if ($tempID == $userID) {
- return $userID;
+ if (!is_null($tempID) && $tempID === $userID) {
+ return (int) $userID;
}
//check if this is a checksum authentication
return $tempID;
}
- return $userID;
+ return is_numeric($userID) ? $userID : NULL;
}
/**
if (!$options) {
$targetField->setAttribute('placeholder', $targetField->getAttribute('data-none-prompt'));
}
- }
+ }
else {
$targetField->setAttribute('placeholder', $targetField->getAttribute('data-empty-prompt'));
$targetField->setAttribute('disabled', 'disabled');