forked from ppound/Islandora_Drupal_Filter
/
filter-drupal.xml
34 lines (28 loc) · 1.7 KB
/
filter-drupal.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
<!--Place this file in $FEDORA_HOME/server/config
Drupal connection info for the FilterDrupal servlet filter.
For multisite drupal installs you can include multiple connection elements.
We will query all the databases and assume any user in any drupal db with
the same username and password are the same user.
We will gather all roles for that user from all databases. This is a
potential security risk if a user in one drupal database has the same
username and password as another user in a seperate drupal database. -->
<FilterDrupal_Connection>
<!-- The values to be inserted below can be found in your drupal site's
settings.php file at the line:
$db_url = 'mysqli://drupaldbuser:drupaldbpass@localhost/drupaldb';
Defaults:
- port = 3306
- jdbcDriverClass = "com.mysql.jdbc.Driver"
- jdbcURLProtocol = "jdbc:mysql"
postgresql users can set: jdbcDriverClass="org.postgresql.Driver" jdbcURLProtocol="jdbc:postgresql"
-->
<connection server="DB_SERVER" port="3306" dbname="DRUPAL_DB_NAME" user="DRUPAL_DB_USER" password="DRUPAL_DB_PASS">
<sql>
<!--Different sql statement for each connection. This is for drupal
multisites that are setup using one database with table prefixes.
We don't do this but some people might.-->
SELECT DISTINCT u.uid AS userid, u.name AS Name, u.pass AS Pass,r.name AS Role FROM (users u LEFT JOIN users_roles ON u.uid=users_roles.uid) LEFT JOIN role r ON r.rid=users_roles.rid WHERE u.name=? AND u.pass=?;
</sql>
</connection>
</FilterDrupal_Connection>