I Need Help Understanding Yii Useridentity And Filter Access

Hello all,

Am new to yii, farely or roughly 3weeks. However am not new to the concept of frameworks previously used codeigniter.

Now to point am about building a site that will require login authentication and every tutorial i see is using the useridentity class but i dont seem to understand what the class does.

My Questions

  1. Cant i implement my own login pattern or script? must i use yii?

  2. if i dont use yii useridentity component can i use the filter access rules ?i.e

rules(){

array(‘deny’

      expression .......) 
  1. where does it sets it cookies?

  2. Wont this class ave limitations?

Note:

Am not New to OOP, i have a strong background.

I just need to be clear on this security issue as it is a bank application and security is so important.

Also on a normal day i track my users on the no of computers the log into. i can restrict them to one or multiple computers, will this class stop me from doing that?

Thanks.

Nice framework never knew i was wasting my time on codeigniter. though it has better documentation.

somebody pls help me

sam (yii developer) answered my question already.

this is his reply.

CUserIdentity is nothing more than

a class that holds data and checks

if user can be authenticated with

this data. Check blog tutorial for

details.

  1. It’s better to use it. But you can

if you absoluttely want it.

  1. Yes, you can but it will require

quite some effort to rewrite some

methods of CWebUser.

  1. CWebUser::login.

  2. Which class? CUserIdentity?

Nope. Typically you’re creating

your own UserIdentity class and

putting it to protected/

components. This new class is

extended from CUserIdentity.

This class will not restrict you from

doing anything. It’s just for

structuring things a bit.

sam (yii developer) answered my question already.

this is his reply.

CUserIdentity is nothing more than

a class that holds data and checks

if user can be authenticated with

this data. Check blog tutorial for

details.

  1. It’s better to use it. But you can

if you absoluttely want it.

  1. Yes, you can but it will require

quite some effort to rewrite some

methods of CWebUser.

  1. CWebUser::login.

  2. Which class? CUserIdentity?

Nope. Typically you’re creating

your own UserIdentity class and

putting it to protected/

components. This new class is

extended from CUserIdentity.

This class will not restrict you from

doing anything. It’s just for

structuring things a bit.