I didn't change register action at all.
I just added the Media behaviors to user model $actsAs.
Its working perfectly in other controllers.

Anyway I found a solution:
I needed the media plugin in order to upload the user profile image.
I removed the 'Media.Coupler' from the user model $actsAs
and add this code at user controller upload_image action:

public function upload_image() {
            $this->User->Behaviors->attach('Media.Coupler');
            ...
            ...
            $this->User->Behaviors->detach('Media.Coupler');
            $this->redirect($this->referer());
        }

But it means that I can't add image_file field to registration form.
After the user registered and verified his account he should enter his
profile page and add an image.

I should try using the media plugin on a clean solution to decide where is
the problem


On Fri, Sep 16, 2011 at 12:34 PM, WebbedIT <p...@webbedit.co.uk> wrote:

> More information required ...
>
> - have you echoed $this->data on submit to see what data there is
> - how are you calling save in the controller?
> - have you looked at the sql dump to see what Cake is trying?
>
> HTH, Paul
> @phpMagpie
>
> On Sep 15, 11:11 am, ZAky <procsh...@gmail.com> wrote:
> > adding media plugin, 'Media.Coupler', behavior to users plugin model
> > prevent creating new user.
> > I want to save the profile image path in users table.
> > Any suggestions?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to