Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getsomestuff($id = null) {
- if(!empty($id)) {
- $this->recursive = -1;
- $users = $this->find('all', array(
- 'conditions' => array(
- 'User.retailer_id' => $id,
- 'User.role_id' => 6,
- ),
- 'fields' => array(
- 'User.id',
- 'User.firstname',
- 'User.lastname',
- ),
- )
- );
- return Set::combine($users, '{n}.User.id', array('{0} {1} {2}', '{n}.User.firstname', '{n}.User.lastname'));
- }
- return array();
- }
Add Comment
Please, Sign In to add comment