示例#1
0
 public function meAction()
 {
     $user = $this->_helper->api()->core()->getSubject();
     $userid = 0;
     if ($user) {
         $userid = $user->user_id;
     }
     $Api = SocialConnect_Api_Core::factory();
     $this->view->connectAgents = $Api->getConnectAgents($userid);
     $this->view->disconnectAgents = $Api->getDisconnectAgents($userid);
     $this->view->unsetupServices = $Api->getUnsetupServices($userid);
     //$this->view->disconnectedService = $Api->getDisconnecedService($userid);
 }
示例#2
0
 /**
  * @return unknown_type
  */
 public function mapAction()
 {
     $service = $this->_request->getParam('service');
     // In smoothbox
     $form = $this->view->form = new SocialConnect_Form_Map();
     $check = SocialConnect_Api_Core::getMapService($service);
     $title = sprintf('%s to Social Engine Profile ', ucfirst($service));
     $desc = 'Set "None" value if you do not need to map %s fields.';
     $desc = sprintf($desc, ucfirst($service));
     if ($check == 'openid') {
         $desc .= ' This configuration affects to all OpenID service providers as myopenid, yiid.com, etc.';
     }
     $form->setTitle($title);
     $form->setDescription($desc);
     $form->populateData($service);
     if ($this->_request->isPost() && $form->isValid($_POST)) {
         $result = $form->commitSave($service);
         if ($result) {
             return $this->_forward('success', 'utility', 'core', array('messages' => array(Zend_Registry::get('Zend_Translate')->_('Your changes have been saved.')), 'layout' => 'default-simple', 'smoothboxClose' => true, 'parentRefresh' => false));
         }
     }
 }