Tuesday, May 29, 2012

Re: Extend model/datasource to save user_id on create, update

you are probably looking for some "WhoDidItBehavior"


Am Dienstag, 29. Mai 2012 15:23:39 UTC+2 schrieb GB:
We believe it is important to save the user id with a record both on create and update to know who created/changed it.  So if table has columns 'create_user_id' and 'update_user_id', they would get populated with the user_id of who is logged in on create/update, just like the 'created'/'updated' timestamps automagically get set on create/update.

I recall seeing this long ago but cannot find in any archives.  Can anyone point me to resources on how to do this?  I suspect it means extending the model in AppModel but wasn't sure if more appropriate extending the Datasource.

Thanks!

George

--
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: