Files
FHC-Core/application/controllers/Cis/Profil.php
T
2023-11-14 11:52:45 +01:00

68 lines
1.3 KiB
PHP

<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Profil extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct([
'index' => ['student/anrechnung_beantragen:r','user:r'], // TODO(chris): permissions?
'getUser' => ['student/anrechnung_beantragen:r','user:r']
]);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @return void
*/
public function index()
{
//echo = getAuthUID();
$this->load->view('Cis/Profil', ["uid" => getAuthUID()]);
}
public function getUser()
{
$myObj = new stdClass();
$myObj->name = "John";
$myObj->age = 30;
$myObj->city = "New York";
echo json_encode($myObj);
}
/*
public function _remap($param)
{
/$uid wird als global variable weiter gegeben
/get the data from the database with the uid
/give the data to the view
/put the queried data in global array and access properties needed in the specific view $profile_information = array()
/$this -> load->view('Cis/StudentProfile', ["uid" => $uid])
if ($param === 'some_method')
{
echo "if";
}
else
{
echo "else";
}
}*/
}