Translated using Weblate (Czech)
[phpmyadmin.git] / examples / signon-script.php
blob175c7f78699ae72d0ffb7c81c4e99097c1953761
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Single signon for phpMyAdmin
6 * This is just example how to use script based single signon with
7 * phpMyAdmin, it is not intended to be perfect code and look, only
8 * shows how you can integrate this functionality in your application.
10 * @package PhpMyAdmin
11 * @subpackage Example
13 declare(strict_types=1);
15 /**
16 * This function returns username and password.
18 * It can optionally use configured username as parameter.
20 * @param string $user User name
22 * @return array
24 function get_login_credentials($user)
26 /* Optionally we can use passed username */
27 if (! empty($user)) {
28 return [
29 $user,
30 'password',
34 /* Here we would retrieve the credentials */
35 return [
36 'root',
37 '',