Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
beca106a
Commit
beca106a
authored
15 years ago
by
Adrian Lang
Browse files
Options
Downloads
Patches
Plain Diff
Check whether $auth is set
darcs-hash:20091124152419-e4919-b4d55158c15d637a453b082eae6a80a828818934.gz
parent
b1f92db2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/auth.php
+9
-1
9 additions, 1 deletion
inc/auth.php
with
9 additions
and
1 deletion
inc/auth.php
+
9
−
1
View file @
beca106a
...
...
@@ -150,6 +150,8 @@ function auth_login($user,$pass,$sticky=false,$silent=false){
global
$auth
;
$sticky
?
$sticky
=
true
:
$sticky
=
false
;
//sanity check
if
(
!
$auth
)
return
false
;
if
(
!
empty
(
$user
)){
//usual login
if
(
$auth
->
checkPass
(
$user
,
$pass
)){
...
...
@@ -337,7 +339,7 @@ function auth_ismanager($user=null,$groups=null,$adminonly=false){
global
$USERINFO
;
global
$auth
;
if
(
!
$
conf
[
'useacl'
]
)
return
false
;
if
(
!
$
auth
)
return
false
;
if
(
is_null
(
$user
))
{
if
(
!
isset
(
$_SERVER
[
'REMOTE_USER'
]))
{
return
false
;
...
...
@@ -453,6 +455,7 @@ function auth_aclcheck($id,$user,$groups){
// if no ACL is used always return upload rights
if
(
!
$conf
[
'useacl'
])
return
AUTH_UPLOAD
;
if
(
!
$auth
)
return
AUTH_NONE
;
//make sure groups is an array
if
(
!
is_array
(
$groups
))
$groups
=
array
();
...
...
@@ -613,6 +616,7 @@ function auth_sendPassword($user,$password){
global
$conf
;
global
$lang
;
global
$auth
;
if
(
!
$auth
)
return
false
;
$hdrs
=
''
;
$user
=
$auth
->
cleanUser
(
$user
);
...
...
@@ -647,6 +651,7 @@ function register(){
global
$conf
;
global
$auth
;
if
(
!
$auth
)
return
false
;
if
(
!
$_POST
[
'save'
])
return
false
;
if
(
!
$auth
->
canDo
(
'addUser'
))
return
false
;
...
...
@@ -724,6 +729,7 @@ function updateprofile() {
global
$lang
;
global
$auth
;
if
(
!
$auth
)
return
false
;
if
(
empty
(
$_POST
[
'save'
]))
return
false
;
if
(
!
checkSecurityToken
())
return
false
;
...
...
@@ -799,6 +805,7 @@ function act_resendpwd(){
global
$auth
;
if
(
!
actionOK
(
'resendpwd'
))
return
false
;
if
(
!
$auth
)
return
false
;
// should not be able to get here without modPass being possible...
if
(
!
$auth
->
canDo
(
'modPass'
))
{
...
...
@@ -1044,6 +1051,7 @@ function auth_setCookie($user,$pass,$sticky) {
global
$auth
;
global
$USERINFO
;
if
(
!
$auth
)
return
false
;
$USERINFO
=
$auth
->
getUserData
(
$user
);
// set cookie
...
...
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