[symfony-users] Re: custom user class

2009-10-28 Thread lorenx
hi alexandru... my question "1)" was exactly on that class: the call (BasesfGuardAuthActions.class.php: 45) is all lowercase ("sign()") but the sfGuardSecurityUser method as the capital i ("signIn()")... just another question i didn't find with google: what's the difference between the sfValidato

[symfony-users] Re: custom user class

2009-10-27 Thread Alexandru-Emil Lupu
Hi! 2) - in the validator, check what is happening . You shall see that the validator is ooverloading the post with a "user" key, that is the sfGuardUser ( plugins/sfGuardPlugin/lib/validator/ ) 1) that signin method is avalilable in the sfGuardSecurity user or so ( plugins/sfGuardPlugin/lib/model

[symfony-users] Re: custom user class

2009-10-27 Thread lorenx
hi frank, i'm studing the sfGuardPlugin... just one question: i cannot understand the call $this->getUser()->signin($values['user'], array_key_exists('remember', $values) ? $values['remember'] : false); (BasesfGuardAuthActions.class.php: 45) i guess that it referes to the signin method of the sf

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
ok, sure... so i guess that all the signin code should be here, in myUser class, and not in the signin module... anyway, i'll have a deep look at the sfGuardSecurityUser.class.php code. thanks very much for your time! On Oct 27, 12:35 am, Frank Stelzer wrote: > look in the signin method, this

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
look in the signin method, this attribute is saved there: " $this->setAttribute('user_id', $user->getId(), 'sfGuardSecurityUser');" Ok i think the rest is really search and find stuff and should not be discussed on this public list furthermore. Am 27.10.2009 um 00:28 schrieb lorenx: > > d

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
don't you think you've finished with me! :P $id = $this->getAttribute('id', null, 'MyCustomUser') does not return any id... :( i've even tried: $this->getAttribute('id', null, 'sfGuardSecurityUser') and $this->getAttribute('user_id', null, 'sfGuardSecurityUser') On Oct 27, 12:11 am, Frank Ste

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
eureka! :) Am 27.10.2009 um 00:06 schrieb lorenx: > > do you mean somethig like this? > > class myUser extends sfBasicSecurityUser > { >protected $user = null; > >public function getCustomUser() { >if (!$this->user && $id = $this->getAttribute('id', null, > 'MyCustomUser')) { >

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
do you mean somethig like this? class myUser extends sfBasicSecurityUser { protected $user = null; public function getCustomUser() { if (!$this->user && $id = $this->getAttribute('id', null, 'MyCustomUser')) { $this->user = MyCustomUserPeer::retrieveByPk($id);

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
Yes "Add a method in your myUser class for retrieving an according and valid instance of your guard user entry and thats it (see getGuardUser)." ... guard user is your custom user. Am 26.10.2009 um 23:55 schrieb lorenx: > > mmm, > but i don't have any getCustomUser() method; > it seems

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
mmm, but i don't have any getCustomUser() method; it seems that it should return a MyCustomUser instance... On Oct 26, 11:45 pm, Frank Stelzer wrote: > You do not have to re-implement those methods, as your model class has   > it already done. > > You cann access them via: > > $this->getUser()-

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
You do not have to re-implement those methods, as your model class has it already done. You cann access them via: $this->getUser()->getCustomUser()->getEmail(); or add wrapper methods in your myUser class: myUser: --- public function getEmail() { return $this->getCustomUser()->getEmail()

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
> 3. Add a "getCustomUser" method to your myUser class and generate the   > mentioned link in this way. sorry but... if i need a (custom) getUsername() or a getEmail() method, do i need to re-implement these methods from scratch in myUser class although i already have them in MyCustomUser class?

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
> here my problem is that it does not seem possible to extend "my custom > user class" to sfBasicSecurityUser cause it already extends its base > class! > i'm stuck here... 1. Take the myUser class and extend it from sfBasicSecurityUser as it is by default. 2. Leave your MyCustomUser model clas

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
> The "myUser" class handles all security and session related stuff. It   > does not know any model specific details, as there might be something   > like a username field or an email field in some database table. ok. > The "guard" user (the one you already have implemented) is the one,   > whic

[symfony-users] Re: custom user class

2009-10-26 Thread Frank Stelzer
Hi, You have to understand the purposes of the two different user classes: The "myUser" class handles all security and session related stuff. It does not know any model specific details, as there might be something like a username field or an email field in some database table. The "guard"

[symfony-users] Re: custom user class

2009-10-26 Thread lorenx
thank you very much for your reply, but... i already tried the sfGuardPlugin plugin and now i'd like to implement my own user management. how to bing my user class to the system one? On Oct 26, 9:43 pm, Alexandru-Emil Lupu wrote: > The ACL system is very simple ... > You have 2 types of permis

[symfony-users] Re: custom user class

2009-10-26 Thread Alexandru-Emil Lupu
The ACL system is very simple ... You have 2 types of permissions: - user permissions and group permissions. When the user logs in, the system automatically compiles the permissions and stores on the session. check here http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branches/1.2/lib