+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* machine. Each form can also operate in various modes
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
// 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');