Subversion Repositories SmartDukaan

Rev

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

Rev 12345 Rev 12351
Line 9... Line 9...
9
 */
9
 */
10
class User extends AppModel {
10
class User extends AppModel {
11
 
11
 
12
	public $actsAs = array('SignMeUp.SignMeUp');
12
	public $actsAs = array('SignMeUp.SignMeUp');
13
 
13
 
-
 
14
	public $useTable = 'marketingusers';
-
 
15
 
14
/**
16
/**
15
 * Display field
17
 * Display field
16
 *
18
 *
17
 * @var string
19
 * @var string
18
 */
20
 */
Line 166... Line 168...
166
/**
168
/**
167
 * belongsTo associations
169
 * belongsTo associations
168
 *
170
 *
169
 * @var array
171
 * @var array
170
 */
172
 */
-
 
173
	/*
171
	public $belongsTo = array(
174
	public $belongsTo = array(
172
		'Group' => array(
175
		'Group' => array(
173
			'className' => 'Group',
176
			'className' => 'Group',
174
			'foreignKey' => 'group_id',
177
			'foreignKey' => 'group_id',
175
			'conditions' => '',
178
			'conditions' => '',
176
			'fields' => '',
179
			'fields' => '',
177
			'order' => ''
180
			'order' => ''
178
		)
181
		)
179
	);
182
	);
-
 
183
	*/
180
 
184
 
181
	public function checkFbUser($user,$access_token){
185
	public function checkFbUser($user,$access_token){
182
		$conditions = array('User.email' => $user->email);
186
		$conditions = array('User.email' => $user->email);
183
		// $conditions = array('User.facebook_id' => $user->id);
187
		// $conditions = array('User.facebook_id' => $user->id);
184
		$nativeUser = $this->find('first',array('conditions' => $conditions,'recursive' => -1));
188
		$nativeUser = $this->find('first',array('conditions' => $conditions,'recursive' => -1));