public function actionGetUserProfileData() {
$this -> layout = false;
header('Content-type: application/json');
$uid = $_GET['uid'];
$profiles = Profiles::model()->findByPk($uid);
$userProfileData = array(
'firstname' => $profiles->firstname,
'street_address' => $profiles->street_address,
'city' => $profiles->city,
'contact_no' => $profiles->contact_no,
'country_code' => $profiles->country_code,
);
echo CJSON::encode($userProfileData);
Yii::app() -> end();
}
$this -> layout = false;
header('Content-type: application/json');
$uid = $_GET['uid'];
$profiles = Profiles::model()->findByPk($uid);
$userProfileData = array(
'firstname' => $profiles->firstname,
'street_address' => $profiles->street_address,
'city' => $profiles->city,
'contact_no' => $profiles->contact_no,
'country_code' => $profiles->country_code,
);
echo CJSON::encode($userProfileData);
Yii::app() -> end();
}
No comments:
Post a Comment