ispman/lib/ISPMan ProcessMan.pm,1.19,1.20

[email protected]
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1:/tmp/cvs-serv11156

Modified Files:
	ProcessMan.pm 
Log Message:
Setting proper sessionIDs and username.

If using Admin interface.
Sessionid taken from current session
ispmanuser from the logged in user

If using control panel then the session-id is CONTROLPANEL-domain
and the user is set to domain

This should take care of most CCP+Agent problem


Index: ProcessMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ProcessMan.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- ProcessMan.pm	9 Jul 2003 16:42:15 -0000	1.19
+++ ProcessMan.pm	14 Jan 2004 01:16:14 -0000	1.20
@@ -137,17 +137,20 @@
    $data->{'ispmanDomain'}=$domain;
    if ($ENV{'HTTP_USER_AGENT'}){
       if ($self->{'sessID'}) {
-         $data->{'ispmanStatus'}="insession";
-         $data->{'ispmanSession'}=$self->{'sessID'};
+		$data->{'ispmanStatus'}="insession";
+		$data->{'ispmanSession'}=$self->{'sessID'};
+		$data->{'ispmanUser'}=$self->{'REMOTE_USER'};		 
       } else {
-         $data->{'ispmanStatus'}="new";
+		$data->{'ispmanStatus'}="new";
+		$data->{'ispmanSession'}="CONTROLPANEL-$domain";
+		$data->{'ispmanUser'}=$domain;		 
       }
    } else {
-      $data->{'ispmanSession'}="CONSOLE";
-      $data->{'ispmanStatus'}="new";
+		$data->{'ispmanSession'}="CONSOLE";
+		$data->{'ispmanUser'}=$ENV{'USER'}|| "ConsoleUser without a USER set";
+		$data->{'ispmanStatus'}="new";
    }
    
-   $data->{'ispmanUser'}=$self->{'REMOTE_USER'} || $ENV{'USER'}|| "ConsoleUser without a USER set";
    $self->addNewEntryWithData($dn, $data);
 }
 




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.