Skip to content
Permalink
Browse files

code style fix as requested

  • Loading branch information...
nicolabeghin committed Apr 23, 2017
1 parent 99d02a8 commit 09a981ba383170d8a56d97fa1b46937150d4ef22
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
@@ -82,12 +82,9 @@ public function authenticate(CakeRequest $request, CakeResponse $response) {
* @return mixed Either false or an array of user information
*/
public function getUser(CakeRequest $request) {
$username = '';
$pass = '';
if (isset($_SERVER['PHP_AUTH_USER'])) {
$username = env('PHP_AUTH_USER');
$pass = env('PHP_AUTH_PW');
} else {
$username = env('PHP_AUTH_USER');
$pass = env('PHP_AUTH_PW');
if (empty($username)) {
$httpAuthorization = $request->header('Authorization');
if ($httpAuthorization !== false && strlen($httpAuthorization) > 0 && strpos($httpAuthorization, 'Basic') !== false) {
list($username, $pass) = explode(':', base64_decode(substr($httpAuthorization, 6)));

0 comments on commit 09a981b

Please sign in to comment.
You can’t perform that action at this time.