Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by madmartigan ( 16 years ago )
<?
/* file application/libraries/MY_Controller.php */
class Auth_Controller extends Controller {
function __construct()
{
parent::__construct();
if ($this->tank_auth->is_logged_in()) {
$data['auth']['username'] = $this->tank_auth->get_username();
$data['auth']['user_id'] = $this->tank_auth->get_user_id();
$data['auth']['profile'] = $this->auth_profile_model->get_profile($data['auth']['user_id']);
}
}
}
/* file /application/controllers/admin_dashboard.php */
class Admin_Dashboard extends Auth_Controller {
function index()
{
echo 'You are logged in';
}
}
Revise this Paste
Parent: 25198