Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
6b4d4a3b
Commit
6b4d4a3b
authored
Feb 05, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- FIX
parent
1ca13e52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
common/modules/users/models/User.php
common/modules/users/models/User.php
+8
-8
No files found.
common/modules/users/models/User.php
View file @
6b4d4a3b
...
@@ -409,13 +409,13 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
...
@@ -409,13 +409,13 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public
function
getRole
()
public
function
getRole
()
{
{
$auth
=
AuthItem
::
find
()
->
joinWith
(
'assignment'
,
true
)
//
$auth = AuthItem::find()->joinWith('assignment', true)
->
andWhere
([
'rule_name'
=>
'group'
])
//
->andWhere(['rule_name' => 'group'])
->
andWhere
([
'auth_assignment.user_id'
=>
$this
->
id
])
//
->andWhere(['auth_assignment.user_id' => $this->id])
->
one
();
//
->one();
//
return
$auth
->
name
;
//
return $auth->name;
/*
$assigment = AuthAssignment::find(['userid' => $this->id])->one();
$assigment
=
AuthAssignment
::
find
([
'userid'
=>
$this
->
id
])
->
one
();
if
(
!
$assigment
)
if
(
!
$assigment
)
{
{
$assigment
=
new
AuthAssignment
();
$assigment
=
new
AuthAssignment
();
...
@@ -425,7 +425,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
...
@@ -425,7 +425,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
}
}
return
$assigment
->
role
;
return
$assigment
->
role
;
return 'admin';
*/
return
'admin'
;
}
}
public
function
getRoleName
()
public
function
getRoleName
()
...
...
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