Hi
I am new to cake php and as a practice I am working on one simple
project.
I have tree model user, account and contact as below. (There is only
one form for user registration and no form for add action to account).

user model :
        var $name = 'User';
        var $useTable = 'users';
        var $hasOne = array('accounts');
        var $hasMany = array('contacts');

I am saving users email as the username in this model,(I am using Auth
component)

and account:

        var $name = 'Account';
        var $belongsTo = array(
                'User' => array(
                    'className'    => 'User',
                    'foreignKey'    => 'user_id'
                )
            );

I need to create a record in account when a user is registering
(register action of controller) (or when user is verifying their email
address - verify action of controller) the information in this model
should calculated. (no form involved). there is one field in account
called user credit. which I need to update it whenever user add a
contact(again b).

I don't know where and how to implement this functionality. any
suggestion would be appreciated.


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to