remove debug logging
This commit is contained in:
parent
f26c9168c4
commit
dbdd1ae51e
|
@ -75,7 +75,6 @@ class AppController extends Controller {
|
||||||
if ( $zmOptAuth=='1' ) {
|
if ( $zmOptAuth=='1' ) {
|
||||||
if ( $_REQUEST['user'] and $_REQUEST['pass'] ) {
|
if ( $_REQUEST['user'] and $_REQUEST['pass'] ) {
|
||||||
$this->loadModel('User');
|
$this->loadModel('User');
|
||||||
$this->log("have user " . $_REQUEST['user'] ." and pass " . $_REQUEST['pass'] ."!", 'error');
|
|
||||||
$user = $this->User->find('first', array ('conditions' => array (
|
$user = $this->User->find('first', array ('conditions' => array (
|
||||||
'User.Username' => $_REQUEST['user'],
|
'User.Username' => $_REQUEST['user'],
|
||||||
'User.Password' => $_REQUEST['pass'],
|
'User.Password' => $_REQUEST['pass'],
|
||||||
|
@ -84,7 +83,6 @@ class AppController extends Controller {
|
||||||
throw new UnauthorizedException(__('User not found'));
|
throw new UnauthorizedException(__('User not found'));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$this->log("Found user " . $_REQUEST['user'] ." and pass " . $_REQUEST['pass'] ."!", 'error');
|
|
||||||
$this->Session->Write( 'user.Username', $user['User']['Username'] );
|
$this->Session->Write( 'user.Username', $user['User']['Username'] );
|
||||||
$this->Session->Write( 'user.Enabled', $user['User']['Enabled'] );
|
$this->Session->Write( 'user.Enabled', $user['User']['Enabled'] );
|
||||||
}
|
}
|
||||||
|
@ -98,7 +96,7 @@ class AppController extends Controller {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = array ('conditions' => array ('User.Username' => $loggedinUser));
|
$options = array ('conditions' => array ('User.Username' => $this->Session->Read('user.Username')));
|
||||||
$userMonitors = $this->User->find('first', $options);
|
$userMonitors = $this->User->find('first', $options);
|
||||||
$this->Session->Write('allowedMonitors',$userMonitors['User']['MonitorIds']);
|
$this->Session->Write('allowedMonitors',$userMonitors['User']['MonitorIds']);
|
||||||
$this->Session->Write('streamPermission',$userMonitors['User']['Stream']);
|
$this->Session->Write('streamPermission',$userMonitors['User']['Stream']);
|
||||||
|
|
Loading…
Reference in New Issue