2014-03-19 00:09:08
$this->loadmodel('UserinGroup');
$11111= $this->UserinGroup->find('count', array(
    'conditions' => array(
    	'UserinGroup.userid' => $userid,
 
    	)
));
$arr = array();
foreach ($1111 as $values) {
		$this->loadModel('Group');
		$arr[]= $this->Group->find('all', array(
			'conditions' => array(
				'Grup.id' => $values['useringorups ']['groupid'],
			)
		));
 
}

This is the pop-up flow.

[close]

$this->loadmodel('UserinGroup');
$11111= $this->UserinGroup->find('count', array(
    'conditions' => array(
    	'UserinGroup.userid' => $userid,
 
    	)
));
$arr = array();
foreach ($1111 as $values) {
		$this->loadModel('Group');
		$arr[]= $this->Group->find('all', array(
			'conditions' => array(
				'Grup.id' => $values['useringorups ']['groupid'],
			)
		));
 
}
 
$arr2 = array();
foreach ($arr as $values) {
	$this->loadModel('User');
		$arr2[]= $this->User->find('all', array(
			'conditions' => array(
				'User.id' => $values['Group ']['teamleaderid'],
			)
		));
 
}

This is the pop-up flow.

[close]

$this->loadmodel('UserinGroup');
$11111= $this->UserinGroup->find('count', array(
    'conditions' => array(
    	'UserinGroup.userid' => $userid,
 
    	)
));
$arr = array();
foreach ($1111 as $values) {
		$this->loadModel('Group');
		$arr[]= $this->Group->find('all', array(
			'conditions' => array(
				'Grup.id' => $values['useringorups ']['groupid'],
			)
		));
 
}
 
$arr2 = array();
foreach ($arr as $values) {
	$this->loadModel('User');
		$arr2[]= $this->User->find('all', array(
			'conditions' => array(
				'User.id' => $values['Group ']['teamleaderid'],
			)
		));
 
}
Invalid Email or Password