开发者

customize sfApplyApply or create separate module?

I'm not sure if I am approaching this the right way; looking for some input from the community.

I'm using the following pluggins:

  • sfDoctrineGuardPluggin //for user management
  • sfForkedDoctrineGuardApplyPluggin //for registration of new users

What I'm trying to achieve:

I'd like to allow my registered users to register child-users. To do this, the child-user's that they create must inherit a couple of the parents attributes (their corporate_id, employer_type, etc... in child-user's profile at bind time). Setting these attributes has been challenging, as from what I can surmise from my reasearch, the sfApplyApply fo开发者_如何学Crm does not have setters that can be overridden.

As an alternative, I attempted to create a whole new "user" module which uses the sf_guard_user table schema. This worked somewhat, but it lost the features found in the registration pluggin (email confirmation) and it was not salting the password or something because I was never able to login a user created this way - which always produced an error saying the username or password were incorrect.

So the question is, what's the best approach to achieve my desired result?


In your action:

  public function executeNew(sfWebRequest $request)
  {      
      $this->form = new sfApplyChildApplyForm(); 
  }

In the plugin forms, create a form called sfApplyChildApplyForm modeled after sfApplyApplyForm.

That's it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜