Revision #8 was created by Phil Loaiza on Feb 11, 2014, 7:32:44 PM.
Minor cleanup
Content
[...]
Please note that this article is a simple example and good security should be taken into account when we play with authentication systems.
### Step 1. Setting up
a. **Include a field on your user’s table** named, yep you guessed, level
b. **Create an object ‘LevelLookUp’** that will tell us who is who on this system (create LevelLookUp.php inside protected/component/)
[...]
{
$username = strtolower($this->username);
// from database... change to suite your authentication criteria
// -- Nope, I wont include mine --
$user = User::model()->find('LOWER(username)=?', array($username));
[...]
```
You can create more methods, like for example, isMember(), or whatever best suits you, in order to display the appropriate view or specific, data according to the user level.