Here is a function in a Controller that lets a user log out. But how do I enable the user to do this? I would think the answer is to put a hyperlink in a View. But I can't figure out how to make a hyperlink that invokes the function. (And I'd rather not build a form ...) Source for this code
class Auth extends Controller {
   ....
  function logout() 
  {
    $this->data['title'] = "Logout";
    //Library function
    $logout = $this->ion_auth->logout();
    //redirect them back to the page they came from
    redirect('auth', 'refresh');
  }
   ....
}