Merge pull request #17076 from lrb2/fix-table-grouping
[phpmyadmin.git] / examples / signon-script.php
blob34e419c17c41e7e45042ef465656168db216760d
1 <?php
2 /**
3 * Single signon for phpMyAdmin
5 * This is just example how to use script based single signon with
6 * phpMyAdmin, it is not intended to be perfect code and look, only
7 * shows how you can integrate this functionality in your application.
8 */
10 declare(strict_types=1);
12 // phpcs:disable Squiz.Functions.GlobalFunction
14 /**
15 * This function returns username and password.
17 * It can optionally use configured username as parameter.
19 * @param string $user User name
21 * @return array
23 function get_login_credentials($user)
25 /* Optionally we can use passed username */
26 if (! empty($user)) {
27 return [
28 $user,
29 'password',
33 /* Here we would retrieve the credentials */
34 return [
35 'root',
36 '',