Skip to content

Commit

Permalink
redirect on passing "redirect" array key (extension to PR #183)
Browse files Browse the repository at this point in the history
  • Loading branch information
psolom committed Jun 10, 2017
1 parent cda8194 commit 778755b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions connectors/php/filemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,18 @@
// Implement this function to authenticate the user, for example to check a
// password login, or restrict client IP address.
//
// If this function returns a string, the authenication will fail and
// the user will be redirected to the returned URL.
//
// This function only authorizes the user to connect and/or load the initial page.
// Authorization for individual files or dirs is provided by the two functions below.
//
// NOTE: If this function returns false, the user will simply see an error. It
// probably makes more sense to redirect the user to a login page instead.
//
// NOTE: If using session variables, the session must be started first (session_start()).
function fm_authenticate()
{
// Customize this code as desired.
return true;

// If this function returns false, the user will just see an error.
// If this function returns an array with "redirect" key, the user will be redirected to the specified URL:
// return ['redirect' => 'http://domain.my/login'];
}


Expand Down

0 comments on commit 778755b

Please sign in to comment.