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.
10 declare(strict_types
=1);
12 // phpcs:disable Squiz.Functions.GlobalFunction
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<int,string>
23 function get_login_credentials(string $user): array
25 /* Optionally we can use passed username */
27 return [$user, 'password'];
30 /* Here we would retrieve the credentials */