Subversion Repositories SmartDukaan

Rev

Rev 21112 | Rev 21118 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21112 Rev 21116
Line 736... Line 736...
736
		//		$last_act_user_id[$value['user_id']] = $last_activated['visited'];
736
		//		$last_act_user_id[$value['user_id']] = $last_activated['visited'];
737
		//	}
737
		//	}
738
		//}
738
		//}
739
		// debug($last_act_user_id);
739
		// debug($last_act_user_id);
740
		//$this->set(compact('last_act_user_id'));
740
		//$this->set(compact('last_act_user_id'));
741
		$options['fields'] = array('id','email','first_name','referrer','utm_source','utm_medium','utm_term','utm_campaign','mobile_number','activated','User.created','Appacl.access', 'User.status', 'UserDoc.user_id');
741
		$options['fields'] = array('id','email','first_name','referrer','utm_source','utm_medium','utm_term','utm_campaign','mobile_number','activated','User.created', 'User.status', 'UserDoc.user_id');
742
		$options['joins'] = array(
742
		$options['joins'] = array(
743
		    /*array('table' => 'useractive',
743
		    /*array('table' => 'useractive',
744
		        'alias' => 'Useractive',
744
		        'alias' => 'Useractive',
745
		        'type' => 'LEFT',
745
		        'type' => 'LEFT',
746
		        'conditions' => array(
746
		        'conditions' => array(
747
		            'Useractive.user_id = User.id',
747
		            'Useractive.user_id = User.id',
748
		        )
748
		        )
749
		    ),*/
749
		    ),
750
		    array('table' => 'appacls',
750
		    array('table' => 'appacls',
751
		        'alias' => 'Appacl',
751
		        'alias' => 'Appacl',
752
		        'type' => 'LEFT',
752
		        'type' => 'LEFT',
753
		        'conditions' => array(
753
		        'conditions' => array(
754
		            'Appacl.user_id = User.id',
754
		            'Appacl.user_id = User.id',
755
		        )
755
		        )
756
		    ),
756
		    ),*/
757
		    array('table' => 'user_docs',
757
		    array('table' => 'user_docs',
758
		        'alias' => 'UserDoc',
758
		        'alias' => 'UserDoc',
759
		        'type' => 'LEFT',
759
		        'type' => 'LEFT',
760
		        'conditions' => array(
760
		        'conditions' => array(
761
		            'UserDoc.user_id = User.id',
761
		            'UserDoc.user_id = User.id',
Line 1612... Line 1612...
1612
		}
1612
		}
1613
		
1613
		
1614
	}
1614
	}
1615
	
1615
	
1616
	function admin_image($id) {
1616
	function admin_image($id) {
1617
		$id = '/RetailerDocs/'.$id;
1617
		$filePath = '/RetailerDocs/'.$id;
1618
		$file = $this->Attachment->getFile($id);
-
 
1619
	    $this->response->file($file['path']);
1618
	    $this->response->file($filePath);
1620
	    // Return response object to prevent controller from trying to render
1619
	    // Return response object to prevent controller from trying to render
1621
	    // a view
1620
	    // a view
1622
	    return $this->response;
1621
	    return $this->response;
1623
	}
1622
	}
1624
	
1623