Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Proper way to inject Session data before model save/validate in CakePHP 1.3?
- if (!empty($this->data)) {
- $this->Model->create();
- $this->data['Model']['agent_id'] = $this->Auth->user('id');
- if ($this->Model->save($this->data)) {
- // success
- }
- }
- // in your Model.php
- App::import('Model', 'CakeSession');
- $session = new CakeSession();
Advertisement
Add Comment
Please, Sign In to add comment