$_defaults
$_defaults :
Default settings
Change values for NetCommons created_by to created_user,updated_by to modified_user
Trackable Behavior
Populate created_by
and updated_by
fields from session data.
It customize for NetCommons mainly customization is for phpmd
beforeSave(\Model $model, array $options = array()) : boolean
Fill the created_by and updated_by fields
Note: Since shells do not have Sessions, created_by/updated_by fields
will not be populated. If a shell needs to populate these fields, you
can simulate a logged in user by setting Trackable.Auth
config:
Configure::write('Trackable.User', array('id' => 1));
Note that value stored in this variable overrides session data.
\Model | $model | instance of model |
array | $options | Options passed from Model::save(). |
True if the operation should continue, false if it should abort