Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
032f38a5
Commit
032f38a5
authored
Feb 28, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added `yii\web\Request::getAuthUser()` and `getAuthPassword()`
parent
24e086de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Request.php
framework/web/Request.php
+16
-0
No files found.
framework/CHANGELOG.md
View file @
032f38a5
...
...
@@ -150,6 +150,7 @@ Yii Framework 2 Change Log
-
Enh: Added support for reading page size from query parameters by
`Pagination`
(qiangxue)
-
Enh: LinkPager can now register relational link tags in the html header for prev, next, first and last page (cebe)
-
Enh: Added
`yii\web\UrlRuleInterface`
and
`yii\web\CompositeUrlRule`
(qiangxue)
-
Enh: Added
`yii\web\Request::getAuthUser()`
and
`getAuthPassword()`
(qiangxue)
-
Chg #1186: Changed
`Sort`
to use comma to separate multiple sort fields and use negative sign to indicate descending sort (qiangxue)
-
Chg #1519:
`yii\web\User::loginRequired()`
now returns the
`Response`
object instead of exiting the application (qiangxue)
-
Chg #1586:
`QueryBuilder::buildLikeCondition()`
will now escape special characters and use percentage characters by default (qiangxue)
...
...
framework/web/Request.php
View file @
032f38a5
...
...
@@ -819,6 +819,22 @@ class Request extends \yii\base\Request
return
isset
(
$_SERVER
[
'REMOTE_HOST'
])
?
$_SERVER
[
'REMOTE_HOST'
]
:
null
;
}
/**
* @return string the username sent via HTTP authentication, null if the username is not given
*/
public
function
getAuthUser
()
{
return
isset
(
$_SERVER
[
'PHP_AUTH_USER'
])
?
$_SERVER
[
'PHP_AUTH_USER'
]
:
null
;
}
/**
* @return string the password sent via HTTP authentication, null if the username is not given
*/
public
function
getAuthPassword
()
{
return
isset
(
$_SERVER
[
'PHP_AUTH_PW'
])
?
$_SERVER
[
'PHP_AUTH_PW'
]
:
null
;
}
private
$_port
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment