aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-04-29 18:04:56 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2021-04-29 18:04:56 +0300
commit4cee97e695c889445c3146bc8169a89b132855ea (patch)
tree693489f2f89f86e277255dfe0f9d5482ecad0359 /library
parentAdd nginx and php-fpm config files (diff)
downloadbugtracker-4cee97e695c889445c3146bc8169a89b132855ea.tar.xz
Finish user management
Diffstat (limited to 'library')
-rw-r--r--library/functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/functions.php b/library/functions.php
index ee3a0d0..9ea37b1 100644
--- a/library/functions.php
+++ b/library/functions.php
@@ -1,5 +1,4 @@
<?php
-session_start();
function truncate($text, $chars = 25) {
if (strlen($text) <= $chars) {
@@ -11,5 +10,11 @@ function truncate($text, $chars = 25) {
$text = $text."...";
return $text;
}
+
+function session_set() {
+ if(isset($_SESSION['user_id']) && $_SESSION['user_id'] != "") {
+ return true;
+ }
+}
?>