Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.

Using WolfAuth

Vheissu edited this page Apr 24, 2011 · 3 revisions

WolfAuth is currently a role based authentication library. You can create, edit, delete and activate users, restrict users from accessing functions and classes, etc. There is also a deny function which lets you allow everyone access to something, except if their username or role ID is defined.

The wiki is full of examples.

Logging a user in.

<?php

class User extends CI_Controller {

`public function __construct()`
`{`
    `parent::__construct();
     $this->load->driver('wolfauth');
`}`

`public function index()`
`{`
	
	`$username = $this->input->post('username');`
	`$password = $this->input->post('password');`

	`$redirect = base_url() . "user/dashboard";`

	`// If data was posted and we're all good`
	`if ( login($username, $password, $redirect) )`
	`{`
		`// If login details are all good, we'll be redirected`
	`}`
	`else`
	`{`
		`$this->load->view('auth/login_form');`
	`}`
	
`}`

}

Clone this wiki locally