Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
b3fc8ffb
Commit
b3fc8ffb
authored
5 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch 'task-3875-login' into 'master'
Task 3875 login See merge request !111
parents
eb475d4e
aab20d91
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/deployment/classes/user.class.php
+5
-3
5 additions, 3 deletions
public_html/deployment/classes/user.class.php
with
5 additions
and
3 deletions
public_html/deployment/classes/user.class.php
+
5
−
3
View file @
b3fc8ffb
...
...
@@ -137,7 +137,7 @@ class user {
*/
public
function
authenticate
(){
global
$aConfig
,
$aParams
;
print_r
(
$aConfig
);
//
print_r($aConfig);
if
(
!
array_key_exists
(
'auth'
,
$aConfig
)
||
!
count
(
$aConfig
[
'auth'
])
||
!
array_key_exists
(
'user'
,
$aParams
)){
return
false
;
}
...
...
@@ -161,8 +161,8 @@ class user {
if
(
$oUserAuth
&&
$oUserAuth
->
authenticate
(
$sUser
,
$sPassword
)){
// set a session - it must correspondent with _autoDetectUser()
$_SESSION
[
"PHP_AUTH_USER"
]
=
$sUser
;
$this
->
setUser
(
''
);
//
$_SESSION["PHP_AUTH_USER"]=$sUser;
$this
->
setUser
(
$sUser
);
return
true
;
}
}
...
...
@@ -181,12 +181,14 @@ class user {
/**
* set an authenticated user and get its roles
* @param string $sUser optional: set a given username
*/
public
function
setUser
(
$sUser
=
false
){
if
(
$sUser
!==
false
){
$this
->
_sUsername
=
$sUser
;
$_SESSION
[
"PHP_AUTH_USER"
]
=
$sUser
;
}
else
{
// check user from basic auth or cli
$this
->
_sUsername
=
$this
->
_autoDetectUser
();
}
$this
->
_getUserGroups
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment