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
515095bb
Commit
515095bb
authored
Dec 29, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1633: Advanced application template now works with MongoDB by default
parent
ccd4ae9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
User.php
apps/advanced/common/models/User.php
+8
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
No files found.
apps/advanced/common/models/User.php
View file @
515095bb
...
...
@@ -68,11 +68,11 @@ class User extends ActiveRecord implements IdentityInterface
}
/**
* @return int|string current user ID
* @return int|string
|array
current user ID
*/
public
function
getId
()
{
return
$this
->
id
;
return
$this
->
getPrimaryKey
()
;
}
/**
...
...
@@ -104,6 +104,12 @@ class User extends ActiveRecord implements IdentityInterface
public
function
rules
()
{
return
[
[
'status'
,
'default'
,
'value'
=>
self
::
STATUS_ACTIVE
],
[
'status'
,
'in'
,
'range'
=>
[
self
::
STATUS_ACTIVE
,
self
::
STATUS_DELETED
]],
[
'role'
,
'default'
,
'value'
=>
self
::
ROLE_USER
],
[
'role'
,
'in'
,
'range'
=>
[
self
::
ROLE_USER
]],
[
'username'
,
'filter'
,
'filter'
=>
'trim'
],
[
'username'
,
'required'
],
[
'username'
,
'string'
,
'min'
=>
2
,
'max'
=>
255
],
...
...
framework/CHANGELOG.md
View file @
515095bb
...
...
@@ -36,6 +36,7 @@ Yii Framework 2 Change Log
-
Enh #1581: Added
`ActiveQuery::joinWith()`
and
`ActiveQuery::innerJoinWith()`
to support joining with relations (qiangxue)
-
Enh #1601: Added support for tagName and encodeLabel parameters in ButtonDropdown (omnilight)
-
Enh #1611: Added
`BaseActiveRecord::markAttributeDirty()`
(qiangxue)
-
Enh #1633: Advanced application template now works with MongoDB by default (samdark)
-
Enh #1634: Use masked CSRF tokens to prevent BREACH exploits (qiangxue)
-
Enh #1641: Added
`BaseActiveRecord::updateAttributes()`
(qiangxue)
-
Enh #1646: Added postgresql
`QueryBuilder::checkIntegrity`
and
`QueryBuilder::resetSequence`
(Ragazzo)
...
...
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