<commit_before>CSP MySQL User Manager
======================

A set of PHP-scripts to manage users in CardserverProxy (CSP)

## Requirements
* Apache or IIS with PHP support (or any other webserver that support PHP)
* MySQL (version 5 or later)
* PHP (version 5 or later)
* CardserverProxy (version 0.8.13 or later)

## Download
You can download the newest release at http://github.com/dukereborn/cmum/releases/

If you prefer to follow the git repository, the following branch and tag names may be of interest
* ``master`` is the current stable release
* ``trunk`` is the development branch

## Installation
1. Upload all the files to your web server.
2. Browse to the install-dir to start the installation, http://your.cmum.url/install/
3. Download the generated config.php and place in the root of you cmum dir
4. Remove the install dir from the cmum dir
5. All done!
6. Setup csp to fetch users from cmum, described bellow

CSP config example for use on a local webserver
```
<user-manager class="com.bowman.cardserv.XmlUserManager" allow-on-failure="false" log-failures="true">
  <auth-config>
  <update-interval>5</update-interval>
  <user-source name="genxmloutput">
    <user-file-url>http://some.webserver/genxml/genxml.php</user-file-url>
  </user-source>
  </auth-config>
</user-manager>
```

CSP config example for use on a remote (or local) secure webserver
```
<user-manager class="com.bowman.cardserv.XmlUserManager" allow-on-failure="false" log-failures="true">
  <auth-config>
  <update-interval>5</update-interval>
  <user-source name="genxmloutput">
    <user-file-url>http://user:password@some.safe.webserver/genxml/genxml.php</user-file-url>
  </user-source>
  </auth-config>
</user-manager>
```
Check the DOCUMENTATION file for more info about cmum setup

## Secretkey
The secretkey is used for securing the sessions when browsing cmum, but also when encrypting the admin passwords. So if you move to another server or take a backup of your cmum installation, make sure to include the config.php. Or at least write down the secretkey, without it you won't be able to login to cmum with the admin account in the database.
<commit_msg>Added genxml options to readme.md<commit_after>CSP MySQL User Manager
======================

A set of PHP-scripts to manage users in CardserverProxy (CSP)

## Requirements
* Apache or IIS with PHP support (or any other webserver that support PHP)
* MySQL (version 5 or later)
* PHP (version 5 or later)
* CardserverProxy (version 0.8.13 or later)

## Download
You can download the newest release at http://github.com/dukereborn/cmum/releases/

If you prefer to follow the git repository, the following branch and tag names may be of interest
* ``master`` is the current stable release
* ``trunk`` is the development branch

## Installation
1. Upload all the files to your web server.
2. Browse to the install-dir to start the installation, http://your.cmum.url/install/
3. Download the generated config.php and place in the root of you cmum dir
4. Remove the install dir from the cmum dir
5. All done!
6. Setup csp to fetch users from cmum, described bellow

CSP config example for use on a local webserver
```
<user-manager class="com.bowman.cardserv.XmlUserManager" allow-on-failure="false" log-failures="true">
  <auth-config>
  <update-interval>5</update-interval>
  <user-source name="genxmloutput">
    <user-file-url>http://some.webserver/genxml/genxml.php</user-file-url>
  </user-source>
  </auth-config>
</user-manager>
```

CSP config example for use on a remote (or local) secure webserver
```
<user-manager class="com.bowman.cardserv.XmlUserManager" allow-on-failure="false" log-failures="true">
  <auth-config>
  <update-interval>5</update-interval>
  <user-source name="genxmloutput">
    <user-file-url>http://user:password@some.safe.webserver/genxml/genxml.php</user-file-url>
  </user-source>
  </auth-config>
</user-manager>
```

## Secretkey
The secretkey is used for securing the sessions when browsing cmum, but also when encrypting the admin passwords. So if you move to another server or take a backup of your cmum installation, make sure to include the config.php. Or at least write down the secretkey, without it you won't be able to login to cmum with the admin account in the database.

## Genxml options
These options were added to manipulate the output from genxml to fit special builds of csp, or by any other reason that you would like to exclude some data in the genxml output. The usage is just like when using genxml key ```genxml.php?option=options``` to use it together with genxml key it should look like this ```genxml.php?key=genxmlkey&amp;option=options``` multiple options are separated by semicolon ';' like this ```genxml.php?key=genxmlkey&amp;option=option1;option2;option3```

**IMPORTANT!!!** Remember to use ```&amp;``` and not just ```&``` between key and option if using both.

Below you will find a list of available options for genxml
```
nousername
nopassword
nodisplayname
noipmask
noprofiles
nomaxconnections
noadmin
noenabled
nomapexclude
nodebug
noemail
nostartdate
noexpiredate
nocustomvalues
```

The options simply does what they are called, for example nostartdate will exclude the start-date="dd-mm-yyyy" from the genxml output.

{'fraction_non_alphanumeric': 0.10558414331999237, 'fraction_numerical': 0.0059081379836096815, 'mean_word_length': 4.643010752688172, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 25}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2689981', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1536, 'n_words': 632}