Announcement

Collapse
No announcement yet.

Record User Login

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Record User Login

    Hi all, Im new to actinic so please be nice

    I wanted to know if it is possible to see who has logged in and when?
    It would be ideal to know, when one of my registered users has actually logged in and browsed. some kind of report showing user name used to log in and maybe the time and date (time and date not so important).

    Thanks,
    Dave

    #2
    Hi Dave,

    Welcome to the forum. We have something in our Advanced User Guide that will allow you to create a log of search terms used on the site and that records 'date/time', 'customer ID' and 'buyer ID', so I am checking with our development team if this can be adapted for your requirements.
    ********************
    Tracey
    SellerDeck

    Comment


      #3
      Hi Dave,

      Our development team have come up with a solution that requires some perl script customisation, so please do the following:

      - open 'Windows Explorer' and browse to 'c:\program files\actinic v7\sites\<site name>'
      - locate 'ACTINIC.pm' and take a backup
      - open the file in a text editor such as notepad and locate:

      Code:
      CAccLogin - User login
      - you should see:

      Code:
      #######################################################
      # CAccLogin - User login
      # No arguments
      - directly before this copy and paste the following code:

      Code:
      #######################################################
      # AccountLogFile
      # Designed to take customer a/c details into a log file
      #######################################################
      sub AccountLogFile
      	{
      	my ($pBuyer) = shift;
      	my $sFilename = GetPath() . "customer_account.log";
      	my $bDoHeader = !-e $sFilename;
      	#
      	# The log file is a comma separated file which contain the following 
      	# items:
      	#
      	# 	0 - date/time
      	# 	1 - browser name or IP address
      	# 	3 - customer ID
      	#	4 - buyer ID
      	#	5 - buyer name
      	#
      	open (LOGFILE, ">>" . $sFilename);
      	#
      	# If the file doesn't exist then create its header
      	#
      	if ($bDoHeader)	
      		{
      		print LOGFILE "Version: $::EC_MAJOR_VERSION\nDate, Remote host, Customer ID, Buyer ID, Buyer Name\n";
      		}
      	print LOGFILE ACTINIC::GetActinicDate();
      	print LOGFILE ", ";
      	print LOGFILE (length $::ENV{REMOTE_HOST} > 0 ? $::ENV{REMOTE_HOST} : $::ENV{REMOTE_ADDR});
      	print LOGFILE ", ";
      	print LOGFILE $$pBuyer{AccountID};
      	print LOGFILE ", ";
      	print LOGFILE $$pBuyer{ID};
      	print LOGFILE ", ";
      	print LOGFILE $$pBuyer{Name};
      	print LOGFILE "\n";
      	close LOGFILE;	
      	}
      - then search for:

      Code:
      $::Session->SetDigest($sDigest);
      and you should see:

      Code:
      if($bLoggingIn)
      			{
      			($Status, $sMessage) = CaccSetCheckoutFields($pBuyer, $pAccount);
      			if($Status != $::SUCCESS)
      				{
      				ACTINIC::ReportError($sMessage, ACTINIC::GetPath());
      				}
      			$::Session->SetDigest($sDigest);
      - copy and paste the following onto a new line after the above:

      Code:
      ACTINIC::AccountLogFile($pBuyer); # Log file for the customer account.
      - close and save the file and upload your site
      - this will then create a file called 'customer_account.log' in the 'acatalog' folder on your server.
      ********************
      Tracey
      SellerDeck

      Comment


        #4
        Hi Tracey,
        Thanks for your reply, I will give this a go tommorow and let you know how I get on.
        Thanks again,
        Dave

        Comment

        Working...
        X