10 Replies Latest reply on Sep 20, 2018 7:01 AM by Jeff Geller

    PrintCenter Release Station

    Robert W Austin Newbie

      I have a PrintCenter Release Station.   The login is a card based system and this part works correctly.  It logs in and I can see the jobs I've sent. 

       

      However,  anytime I print or update,  I get an error

      Release Station.png

      The "CARD#" is the rest of the Card Number.  I have tried multiple things with the Logon script,  but still get this error.  My script currently looks up the "id" and then uses that.   I'm not sure why it still is using the "Card ID" field.

       

      In the documentation,  they stated that there is a new return "<new_user>".   If this is the solution,   does anybody know how to return this.

       

      Thank You,

        • Re: PrintCenter Release Station
          Nic Meadows Ranger

          Share your script and we may be able to help

           

          Usually if you are looking up the logonid from card number you need to assign the PlugIn.Username = loginid; once you've looked it up. This will then replace the cardid that was passed to the script with the loginid. The logonid will then be used in all the events that occur afterwards and should therefore retrieve the correct account.

           

          e.g.

          User.GetUserByCardID(PlugIn.UserName);
          PlugIn.UserName = User.GetProperty("user");
            • Re: PrintCenter Release Station
              Robert W Austin Newbie

              Hello Nic,

               

              Thank you for your advice.    Below is the script.  I was originally using the "User.GetUserByCardID" . However,   that was also producing this same error.   The I attempted to get this via a search in the DB. 

               

               

               

              // PlugIn Script: Logon - verifies that the supplied authentication id is valid

              //---------------------------------------------------------------------------------------

              //  Designed for:  Pharos 8.3

              //  Where:         Pharos Systems International.

              //  Updated:       17-May-2012

              //

              //  Description:

              //    Verifies that the specified logon id is a valid logon id or card id

              //    in the Pharos database.

              //    If the user account is found by the card id, the user's logon id will be

              //    returned (i.e. the card id will be translated to that user's logon id).

              //

              //    If the supplied password is blank, the password is not verified.

              //    If the supplied password is not blank, the password is verified.

              //

              //  Requirements:

              //

              //

              //---------------------------------------------------------------------------------------

              import "IO";

              import "String";

              import "User";

              import "DB";

               

               

               

               

              //---------------------------------------------------------------------------------------

              // Script Info

              //---------------------------------------------------------------------------------------

              // Script name and version.

               

               

              new sScriptName          = "Logon - auth using Pharos DB";

              new sScriptFullName      = "Logon - verifies that the supplied authentication id is valid";

               

               

              IO.PrintLine("Solution: " + sScriptFullName);

              IO.PrintLine("Version: 1");

              IO.PrintLine("Copyright: Pharos Systems International");

               

               

               

               

              //---------------------------------------------------------------------------------------

              // Variables

              //---------------------------------------------------------------------------------------

               

               

              // Error messages

              new eErrorAccountNotFound   = "The account could not be found.";

              new eErrorPasswordInValid   = "The password is not valid.";

              new eErrorAccountNotActive  = "User account is not active.";

               

               

              // Should the password be verified even if a blank password was supplied?

              new bAlwaysVerifyPassword = false;

               

               

              // What characters should be removed from the supplied logon id before

              // searching for the card id?

              new strCardExcludedChars  = "%;=?";

               

               

               

               

              //---------------------------------------------------------------------------------------

              // Constants - DO NOT ALTER

              //---------------------------------------------------------------------------------------

              // None

               

               

              //---------------------------------------------------------------------------------------

              // PlugIn code

              //---------------------------------------------------------------------------------------

               

               

              // By default, the script should fail.

              PlugIn.Result = false;

               

               

              // Check if the supplied logon id matches a Pharos account logon id.

               

               

              function CheckIfCardID(UserName)

              {

                  new strCardId = UserName;

               

               

                  if (String.Length(strCardExcludedChars) > 0)

                  {

                      strCardId = "";

               

               

                  new iPos = 0;

                  while (iPos < String.Length(UserName))

                  {

                          if (String.Find(strCardExcludedChars, UserName[iPos]) == -1)

                          {

                              strCardId += UserName[iPos];

                          }

               

               

                      iPos += 1;

                  }

                    }

                      IO.PrintLine("[" + sScriptName + "] -> New card id to validate: " + strCardId);

              strCardId = String.Left(strCardId,6);

                      strCardId = "N00" + strCardId;

               

               

                  try

              {

              DB.ParametrizedSQL("select top 1 * from users where card_id = @1", strCardId);

               

               

              if (not DB.GetRow())

              {

              exit;

               

               

              }

               

               

              new strNetID = DB.ColumnByName("id");

                                 

                   }

                   catch

                   {

              return false;

                   } 

                

              try

                  {

              User.GetUserByLogon(strNetID);

              PlugIn.UserName = strNetID;

              PlugIn.LoginID = strNetID;

                      IO.PrintLine("[" + sScriptName + "] -> PlugIn.UserName is a valid card id");

              return true;

                  }

                  catch

                  {

                      IO.PrintLine("[" + sScriptName + "] -> PlugIn.UserName is not a valid card id");

                      PlugIn.Error = strCardId + " " + eErrorAccountNotFound;

                      return false;

                  }

              }   

               

               

              new bPharosUserAccountExists = CheckIfCardID(PlugIn.UserName);

               

               

              if (bPharosUserAccountExists)

              {

                 if (User.GetProperty("active") <> 1)

                  {

                      IO.PrintLine("[" + sScriptName + "] -> Pharos account is disabled.");

                      PlugIn.Error = eErrorAccountNotActive;

                      exit;

                  }

               

                  PlugIn.Result = true;

                • Re: PrintCenter Release Station
                  Nic Meadows Ranger

                  Thanks, without trying to sound patronising, can we just confirm the following. (Always good to double check the basics   )

                  Which version of Pharos are you running?

                  Is the script definitely applied to the login event of the bank that the release station is using?

                  Have you restarted the Pharos print server service since applying the script?

                  Can you turn logging on the print server the pharos station is using so we can see what the IO.Printline statements are pushing out.

                   

                  The script itself looks fine and should be work, I don’t have a Pharos environment I can test it on atm though.

                   

                  The default Pharos logon script should also work out of the box without any modification (used many times) The log will give us the clues as to why it’s not working.

              • Re: PrintCenter Release Station
                Katherine Baynton Ranger

                It might also be worth checking if this only happens with your account (I assume you are an Admin user), or whether it also happens with normal user accounts.  There's a chance that this odd behaviour is not related to the script.  Do you charge your printing using the card ID, charged out to a billing system or are the jobs charged to internal Uniprint database accounts?

                • Re: PrintCenter Release Station
                  Jeff Geller Guide

                  Hi Robert,


                  Can you open a formal case with our support team so we can provide a hot fix to you.


                  Thanks,

                  Jeff