import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
40
modules/default/controllers/ProfileController.php
Normal file
40
modules/default/controllers/ProfileController.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2005-2010 Keyboard Monkeys Ltd. http://www.kb-m.com
|
||||
* @license http://creativecommons.org/licenses/BSD/ BSD License
|
||||
* @author Keyboard Monkey Ltd
|
||||
* @since CommunityID 0.9
|
||||
* @package CommunityID
|
||||
* @packager Keyboard Monkeys
|
||||
*/
|
||||
|
||||
class ProfileController extends CommunityID_Controller_Action
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->queryString = $this->_queryString();
|
||||
|
||||
$server = $this->_getOpenIdProvider();
|
||||
$request = $server->decodeRequest();
|
||||
|
||||
$this->view->fields = array();
|
||||
$this->view->policyUrl = false;
|
||||
|
||||
$profiles = new Users_Model_Profiles();
|
||||
$this->view->profiles = $profiles->getForUser($this->user);
|
||||
$requestedProfileId = $this->_getParam('profile');
|
||||
foreach ($this->view->profiles as $profile) {
|
||||
if ($requestedProfileId == 0 || $requestedProfileId == $profile->id) {
|
||||
$this->view->profileId = $profile->id;
|
||||
$personalInfoForm = Users_Form_PersonalInfo::getForm($request, $profile);
|
||||
$this->view->fields = $personalInfoForm->getElements();
|
||||
if ($personalInfoForm->getPolicyUrl()) {
|
||||
$this->view->policyUrl = $personalInfoForm->getPolicyUrl();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//$this->view->profiles->rewind();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user