Added rudimentary support for UID/GID
[mirrors/SokoMan.git] / lib / Sklad_Auth.class / common.php
CommitLineData
cdfce7c2
TM
1<?php
2/*
3 * SkladovySystem - Storage management system compatible with LMS
4 * Copyright (C) 2011 Thomas Mudrunka
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
78bf26a5 20/**
63747dad 21* Trida implementuje podpurne funkce spolecne pro vsechny implementace tridy Sklad_Auth
78bf26a5 22*
63747dad 23* @package Sklad_Auth_common
78bf26a5
TM
24* @author Tomas Mudrunka
25*/
63747dad 26class Sklad_Auth_common {
e9f6461f
TM
27 function get_user($die=true) {
28 if(isset($this->user)) return $this->user;
cdfce7c2
TM
29 if($die) die('No user authorized!!!');
30 return false;
31 }
e9f6461f
TM
32
33 function get_user_id($die=true) {
34 $user = $this->get_user($die);
35 return $user['id'];
36 }
cdfce7c2
TM
37}
38
63747dad 39require_once(BACKEND_AUTH.'.php');
This page took 0.155245 seconds and 4 git commands to generate.