Lines 2330-2335
Link Here
|
2330 |
type => $CONF_TYPE_STRING |
2330 |
type => $CONF_TYPE_STRING |
2331 |
}); |
2331 |
}); |
2332 |
|
2332 |
|
|
|
2333 |
#### Start of modification (last modified on 20061109). |
2334 |
=item bayes_sql_custom_query query |
2335 |
|
2336 |
This option gives you the ability to create a custom SQL query to |
2337 |
retrieve username. In order to work correctly your query should |
2338 |
return only one value, the desired username. In addition, there |
2339 |
are several "variables" that you can use as part of your query, |
2340 |
these variables will be substituted for the current values right |
2341 |
before the query is run. The current allowed variables are: |
2342 |
|
2343 |
=over 2 |
2344 |
|
2345 |
=item _USERNAME_ |
2346 |
|
2347 |
The current user's username. |
2348 |
|
2349 |
=item _DOMAIN_ |
2350 |
|
2351 |
The portion after the @ as derived from the current user's username, this |
2352 |
value may be null. |
2353 |
|
2354 |
=back |
2355 |
|
2356 |
The query must be one continuous line in order to parse correctly. |
2357 |
|
2358 |
Here is an example query, please note that it is broken up for easy |
2359 |
reading, in your config it should be one continuous line. |
2360 |
|
2361 |
=over 1 |
2362 |
|
2363 |
=item Current default query: |
2364 |
|
2365 |
C<SELECT username FROM bayes_vars WHERE username = '*' OR Username = CONCAT('*@',_DOMAIN_) OR Username = _USERNAME_ ORDER BY username ASC> |
2366 |
|
2367 |
=back |
2368 |
|
2369 |
=cut |
2370 |
|
2371 |
push (@cmds, { |
2372 |
setting => 'bayes_sql_custom_query', |
2373 |
is_admin => 1, |
2374 |
type => $CONF_TYPE_STRING |
2375 |
}); |
2376 |
|
2377 |
#### End of modification. |
2378 |
|
2333 |
=item bayes_sql_username_authorized ( 0 | 1 ) (default: 0) |
2379 |
=item bayes_sql_username_authorized ( 0 | 1 ) (default: 0) |
2334 |
|
2380 |
|
2335 |
Whether to call the services_authorized_for_username plugin hook in BayesSQL. |
2381 |
Whether to call the services_authorized_for_username plugin hook in BayesSQL. |