mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix session timeout, adding link, sorting lowercase
This commit is contained in:
parent
864ba53e4a
commit
217fed5c8a
@ -121,7 +121,11 @@ class AppController extends Controller
|
||||
$GLOBALS["passed"] = $passedArguments[0];
|
||||
}
|
||||
$GLOBALS["subside"] = $subside;
|
||||
|
||||
|
||||
// server login
|
||||
if($this->Auth->user('id')) {
|
||||
$GLOBALS['ServerUser'] = $this->Auth->user();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -157,7 +161,10 @@ class AppController extends Controller
|
||||
|
||||
if($json['state'] === 'success' && intval($json['user']['email_checked']) === 1) {
|
||||
//echo "email checked: " . $json['user']['email_checked'] . "; <br>";
|
||||
$session->destroy();
|
||||
if($session->read('session_id') != $session_id ||
|
||||
( $userStored && !isset($userStored['id']))) {
|
||||
$session->destroy();
|
||||
}
|
||||
foreach($json['user'] as $key => $value) {
|
||||
$session->write('StateUser.' . $key, $value );
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ class TransactionCreationsController extends AppController
|
||||
//}
|
||||
}
|
||||
usort($possibleReceiver, function($a, $b) {
|
||||
return ($a['name'] <=> $b['name']);
|
||||
return (strtolower ($a['name']) <=> strtolower ($b['name']));
|
||||
});
|
||||
//var_dump($possibleReceiver);
|
||||
$creationForm = new CreationForm();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
use Cake\Routing\Router;
|
||||
|
||||
/**
|
||||
@ -66,7 +66,10 @@ if(!isset($balance)) {
|
||||
?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li><?= $this->Html->link(__('Startseite'), ['controller' => 'Dashboard'], ['class' => 'grd-nav-bn'])?>
|
||||
<?php if(isset($GLOBALS['ServerUser'])) : ?>
|
||||
<li><?= $this->Html->link(__('Server'), ['controller' => 'Dashboard', 'action' => 'serverIndex'], ['class' => 'grd-nav-bn'])?></li>
|
||||
<?php endif; ?>
|
||||
<li><?= $this->Html->link(__('Startseite'), ['controller' => 'Dashboard'], ['class' => 'grd-nav-bn'])?></li>
|
||||
<!--<li><?= $this->Html->link(__('Kontostand'), ['controller' => 'StateBalances', 'action' => 'overview'], ['class' => 'grd-nav-bn']) ?>-->
|
||||
<?php if(intval($transactionPendings) > 0) : ?>
|
||||
<li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user