2016-04-09 13:44:37 +02:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2016-10-28 21:43:18 +02:00
|
|
|
|
* Questlab
|
2016-04-09 13:44:37 +02:00
|
|
|
|
*
|
|
|
|
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
2016-10-28 21:43:18 +02:00
|
|
|
|
* @copyright 2014 – 2016 Heinrich-Heine-Universität Düsseldorf
|
2016-04-09 13:44:37 +02:00
|
|
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
2016-10-28 21:43:18 +02:00
|
|
|
|
* @link https://github.com/coderkun/questlab
|
2016-04-09 13:44:37 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace hhu\z\controllers;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Controller of the Agent to display and manage userroles.
|
|
|
|
|
*
|
|
|
|
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
|
|
|
|
*/
|
|
|
|
|
class UserrolesController extends \hhu\z\Controller
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Action: user.
|
|
|
|
|
*
|
|
|
|
|
* Show a user and its details.
|
|
|
|
|
*
|
|
|
|
|
* @throws \nre\exceptions\IdNotFoundException
|
|
|
|
|
* @param string $userUrl URL-Username of an user
|
|
|
|
|
*/
|
|
|
|
|
public function user($userUrl)
|
|
|
|
|
{
|
|
|
|
|
// Get userroles
|
|
|
|
|
$roles = $this->Userroles->getUserrolesForUserByUrl($userUrl);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Pass data to view
|
|
|
|
|
$this->set('roles', $roles);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|