/** * * * @return bool|object|string */ public function ensureTransientKey() { if (!$this->_TransientKey) { // Generate a transient key in the browser. $tk = betterRandomString(16, 'Aa0'); setAppCookie('tk', $tk); $this->_TransientKey = $tk; } return $this->_TransientKey; }
/** * * * @return bool|object|string */ public function ensureTransientKey() { if (!$this->_TransientKey) { // Generate a transient key in the browser. $tk = substr(md5(microtime()), 0, 16); setAppCookie('tk', $tk); $this->_TransientKey = $tk; } return $this->_TransientKey; }