src/Model/Table/UsersTable.php
public function save(EntityInterface $entity, $options = [])
    {
        EventManager::trigger('Model.User.beforeSave', $this, [
            'user' => $entity
        ]);

        $success = parent::save($entity, $options);

        EventManager::trigger('Model.User.afterSave', $this, [
            'user'    => $entity,
            'success' => $success
        ]);

        return $success;
    }
public function save(EntityInterface $entity, $options = [])
    {
        EventManager::trigger('Model.User.beforeSave', $this, [
            'user' => $entity
        ]);

        $success = parent::save($entity, $options);

        EventManager::trigger('Model.User.afterSave', $this, [
            'user'    => $entity,
            'success' => $success
        ]);

        return $success;
    }
public function save ( EntityInterface $ entity , $ options = [ ] ) { EventManager :: trigger ( 'Model.User.beforeSave' , $ this , [ 'user' => $ entity ] ) ; $ success = parent :: save ( $ entity , $ options ) ; EventManager :: trigger ( 'Model.User.afterSave' , $ this , [ 'user' => $ entity , 'success' => $ success ] ) ; return $ success ; }
Persists an entity based on the fields that are marked as dirty and
returns the same entity after a successful save or false in case
of any error.

@param   \Cake\Datasource\EntityInterface $entity the entity to be saved
@param   array|\ArrayAccess $options The options to use when saving.
@return  \Cake\Datasource\EntityInterface|false
Persists an entity based on the fields that are marked as dirty and returns the same entity after a successful save or false in case of any error .