CommunityID/modules/users/controllers/ProfileController.php

30 lines
989 B
PHP
Raw Permalink Normal View History

2019-07-17 20:08:50 +00:00
<?php
/*
* @copyright Copyright (C) 2005-2010 Keyboard Monkeys Ltd. http://www.kb-m.com
2019-07-17 20:08:50 +00:00
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
2019-07-17 20:16:19 +00:00
class Users_ProfileController extends CommunityID_Controller_Action
2019-07-17 20:08:50 +00:00
{
public function indexAction()
{
2019-07-17 20:16:19 +00:00
if (!$this->targetUser->id && $this->user->role != Users_Model_User::ROLE_ADMIN) {
2019-07-17 20:08:50 +00:00
throw new Monkeys_AccessDeniedException();
}
$this->view->canEditAccountInfo = !$this->_config->ldap->enabled
|| ($this->_config->ldap->enabled && $this->_config->ldap->keepRecordsSynced);
$this->view->canChangePassword = !$this->_config->ldap->enabled
|| ($this->_config->ldap->enabled && $this->_config->ldap->canChangePassword);
$this->view->yubikey = $this->_config->yubikey;
2019-07-17 20:08:50 +00:00
$this->_helper->actionStack('index', 'login', 'users');
}
}