diff options
author | Michal Čihař <michal@cihar.com> | 2014-05-09 20:06:42 +0400 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2014-05-09 20:07:39 +0400 |
commit | 3eccb9eb2614a9188bcafb54971b9a096421ab11 (patch) | |
tree | ad55c135f4e2fc97c5e91116b8a9023d598f67ee /examples/signon-script.php | |
parent | 616e732c37f9d9685b14bf5a3f027d8b2c3d6bb9 (diff) |
Improve signon-script example
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'examples/signon-script.php')
-rw-r--r-- | examples/signon-script.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/signon-script.php b/examples/signon-script.php index e333f2ee1b..1c2a4b957a 100644 --- a/examples/signon-script.php +++ b/examples/signon-script.php @@ -23,7 +23,15 @@ */ function get_login_credentials($user) { - return array('root', ''); + /* Optionally we can use passed username */ + if (!empty($user)) { + return array($user, 'password'); + } + + /* Here we would retrieve the credentials */ + $credentials = array('root', ''); + + return $credentials; } ?> |