Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
097d50bb
Commit
097d50bb
authored
Sep 21, 2009
by
Richard Mansfield
Browse files
Fail login form submission and add error message when site is closed
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
ad3ba556
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/user.php
View file @
097d50bb
...
...
@@ -782,6 +782,18 @@ class LiveUser extends User {
throw
new
AuthUnknownUserException
(
"
\"
$username
\"
is not known"
);
}
$siteclosedforupgrade
=
get_config
(
'siteclosed'
);
if
(
$siteclosedforupgrade
&&
get_config
(
'disablelogin'
))
{
global
$SESSION
;
$SESSION
->
add_error_msg
(
get_string
(
'siteclosedlogindisabled'
));
return
false
;
}
if
(
!
$user
->
admin
&&
(
$siteclosedforupgrade
||
get_config
(
'siteclosedbyadmin'
)))
{
global
$SESSION
;
$SESSION
->
add_error_msg
(
get_string
(
'siteclosed'
));
return
false
;
}
// Authentication instances that have parents do so because they cannot
// use Mahara's normal login mechanism - for example, XMLRPC. If the
// user is using one of these authentication instances, we look and try
...
...
Write
Preview
Supports
Markdown
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