Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $model = Users::model()->findByAttributes(array('googleid'=>$google_id));
- if($model)
- {
- echo "Good";
- }
- else
- {
- echo $model->googleid = $google_id;
- $model->save();
- }
- Fatal error: Call to undefined method stdClass::save() in E:wampwwwcustomersprotectedviewsusersgooglelogin.php on line 76
- $model = Users::model()->findByAttributes(array('googleid'=>$google_id));
- if($model)
- {
- echo "Good";
- }
- else
- {
- $model_new = new Users;
- echo $model_new->googleid = $google_id;
- $model_new->save();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement