public function testIsUserLoggedIn() { $this->ci->load->model('user_model'); $userDetail = $this->ci->user_model->getUser($this->_username); $this->ci->session->set_userdata((array) $userDetail[0]); $this->assertTrue(user_is_auth()); }
$showt = 1; } else { $link_txt = "I'm attending"; $showt = 2; } } else { if ($event_detail->event_end < time()) { $link_txt = "I attended"; $showt = 3; } else { $link_txt = "I'm attending"; $showt = 4; } } //if they're not logged in, show the questions if (!user_is_auth()) { $attend = false; } ?> <a class="btn<?php echo $attend ? ' btn-success' : ''; ?> " id="mark-attending" href="javascript:void(0);" onclick="return markAttending(this,<?php echo $event_detail->ID; ?> ,<?php echo $event_detail->event_end < time() ? 'true' : 'false'; ?> );"><?php echo $link_txt;
<p class="admin"> <?php if ($admin) { ?> <?php if (isset($event_detail->pending) && $event_detail->pending == 1) { echo '<a class="btn-small" href="/event/approve/' . $event_detail->ID . '">Approve Event</a>'; } } else { ?> <?php if (user_is_auth()) { ?> <a class="btn-small" href="#" id="claim-event-btn">Claim event</a> <?php } } ?> </p>