"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mrbs-1.9.4/web/lib/MRBS/Session/SessionOmni.php" between
mrbs-1.9.4.tar.gz and mrbs-1.10.0.tar.gz

About: MRBS is a web application for booking meeting rooms or other resources (using PHP and MySQL/pgsql).

SessionOmni.php  (mrbs-1.9.4):SessionOmni.php  (mrbs-1.10.0)
<?php <?php
namespace MRBS\Session; namespace MRBS\Session;
use MRBS\User;
/* /*
* Session management scheme that relies on OmniHttpd security for user * Session management scheme that relies on OmniHttpd security for user
* authentication. THIS is suitable for few users because we have to create all * authentication. THIS is suitable for few users because we have to create all
* users connecting to MRBS, since they will have to login. * users connecting to MRBS, since they will have to login.
* *
* To use this authentication scheme set the following things : * To use this authentication scheme set the following things :
* - Edit your virtual server hosting MRBS. * - Edit your virtual server hosting MRBS.
* - Select security tab. * - Select security tab.
* - IF not yet set, choose "User and Directory" security type. * - IF not yet set, choose "User and Directory" security type.
* - Select "Users and groups" tab. * - Select "Users and groups" tab.
skipping to change at line 43 skipping to change at line 45
* Then, you may configure admin users: * Then, you may configure admin users:
* *
* $auth['admin'][] = 'user1'; * $auth['admin'][] = 'user1';
* $auth['admin'][] = 'user2'; * $auth['admin'][] = 'user2';
*/ */
class SessionOmni extends SessionWithoutLogin class SessionOmni extends SessionWithoutLogin
{ {
// No need to prompt for a name - this is done by the server. // No need to prompt for a name - this is done by the server.
public function getCurrentUser() public function getCurrentUser() : ?User
{ {
global $server; global $server;
if ((!isset($server['REMOTE_USER'])) || if ((!isset($server['REMOTE_USER'])) ||
(!is_string($server['REMOTE_USER'])) || (!is_string($server['REMOTE_USER'])) ||
(($server['REMOTE_USER'] === ''))) (($server['REMOTE_USER'] === '')))
{ {
return null; return null;
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)