Choose your language

Choose your login

Support

External Database for Card/ID Numbers

This page applies to:

PaperCut NG/MF can look up Card/ID Numbers from an external database, such as one used to manage secure door access.

Once external user lookups are enabled, PaperCut NG/MF does the following when looking up a user by card number:

  1. Looks for a user with the matching card number in the PaperCut NG/MF database.
  2. If not found, it looks up the card number in the external database.
  3. If it finds a match, it uses the information returned to find the matching user in the PaperCut NG/MF database. If a user is found the lookup is successful.

Configure external database lookup

To enable external card number lookups:

  1. Select Options > Advanced.
    The Advanced page is displayed.
  2. In the External User Lookup area, select the Use external database for card number lookup checkbox.
  3. Select the database type. If using Oracle or MySQL you must install the database driver as described in the Comments , and restart the Application Server.
  4. Enter the database connection URL. For examples see Step 4 - Change the PaperCut NG/MF connection details of Upsize to an external database (RDBMS) .
  5. Enter the database connection username and password.
  6. SQL to map card number in external database to allows you to choose what the card number in your external database maps to. Select the option that matches the mapping in your external database. The options include:

LOOKUP FIELD

USE IF YOUR EXTERNAL DATABASE CONTAINS A MAPPING BETWEEN CARD NUMBERS AND ONE OF THE FOLLOWING:

username

Usernames

user's identity

number

User Card/IDs. The IDs must have been imported and stored in PaperCut NG/MF

username alias

username aliases. The username aliases must have been imported into PaperCut NG/MF and enabled. See Enable username aliasing

alias

Usernames OR aliases. A match with a username is tried first, and if no match is found, a second search looks for a match with the alias

email

Email addresses

7. Enter an SQL select query that looks up the card number in your external database and returns either a username or user id as selected above. The query must return a single row with the first field being the username or user id (as found in PaperCut NG/MF). The SQL statement must contain {cardnumber}, which is replaced with the card number to find.

Some example queries are:

LOOKUP METHOD

QUERY

email

select email from users_table where card_number = {cardnumber}

username alias

select user_alias from users _ table where card_number = {cardnumber}

username / username or alias

select user_name from users_table where card_number = {cardnumber}

 

Testing database lookup

  1. Click the Users tab.
    The User List page is displayed.
  2. Pick a card number from your external database that maps to a user in PaperCut NG/MF.
  3. In Quick Find, enter this card number; then click Go.
  4. Verify that the matching user is displayed. If the expected user is not displayed check the App Log tab for errors.

Comments