/** * Forces a user to be logged in, without specifying a password. * this has to be an object. * @param mixed username * @return boolean */ public function force_login($user, $site_id) { if (!is_object($user)) { echo 'account:force_login = user is not an object'; echo kohana::backtrace(debug_backtrace()); die; } // Mark the session as forced, to prevent users from changing account information $_SESSION['auth_forced'] = TRUE; // Run the standard completion $this->complete_login($user); }