/** * Check if user is logged in * @return boolean Returns true/false if logged in or not */ public function logged_in() { if ($user = $this->_userModel->where('token', Cookie::get('stativo_auth_session'))->first()) { return $user; } return false; }
/** * Get notifications * @return string value */ public static function get() { if ($message = Cookie::get('__notification')) { // Delete the cookie! Power::off(function () { Cookie::delete('__notification'); }); } return $message; }