Latest news
Home » SocialEngine » Get the user id of the profile which is being viewed in socialengine

Get the user id of the profile which is being viewed in socialengine

user id of the profile in socialengine

$subject=Engine_Api::_()->core()->getSubject();
The above code returns the currently set subject. In profile the subject is the currently viewing profile.
So for get id of this profile, use the following code
$profileId=$subject->getIdentity();

Leave a Reply

x

Check Also

Pass custom error message to zend/socialengine form from controller

$this->view->form = $form = new User_Form_Admin_Universities_Createdomain(); $this->view->university_id = $iId = $this->_getParam(‘id’, null); $form->populate(array(‘university_id’=>$iId)); if($this->getRequest()->isPost() && ...