Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
f8f3c9ec
Commit
f8f3c9ec
authored
9 years ago
by
Joas Schilling
Browse files
Options
Downloads
Patches
Plain Diff
Remove password reset when the user can not change the password
parent
e44b164f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/templates/login.php
+6
-2
6 additions, 2 deletions
core/templates/login.php
lib/private/util.php
+6
-0
6 additions, 0 deletions
lib/private/util.php
with
12 additions
and
2 deletions
core/templates/login.php
+
6
−
2
View file @
f8f3c9ec
...
@@ -56,11 +56,15 @@ script('core', [
...
@@ -56,11 +56,15 @@ script('core', [
<input
type=
"submit"
id=
"submit"
class=
"login primary icon-confirm svg"
title=
"
<?php
p
(
$l
->
t
(
'Log in'
));
?>
"
value=
""
disabled=
"disabled"
/>
<input
type=
"submit"
id=
"submit"
class=
"login primary icon-confirm svg"
title=
"
<?php
p
(
$l
->
t
(
'Log in'
));
?>
"
value=
""
disabled=
"disabled"
/>
</p>
</p>
<?php
if
(
isset
(
$_
[
'invalidpassword'
])
&&
(
$_
[
'invalidp
assword'
]))
:
?>
<?php
if
(
!
empty
(
$_
[
'invalidpassword'
])
&&
!
empty
(
$_
[
'canResetP
assword'
]))
{
?>
<a
id=
"lost-password"
class=
"warning"
href=
""
>
<a
id=
"lost-password"
class=
"warning"
href=
""
>
<?php
p
(
$l
->
t
(
'Wrong password. Reset it?'
));
?>
<?php
p
(
$l
->
t
(
'Wrong password. Reset it?'
));
?>
</a>
</a>
<?php
endif
;
?>
<?php
}
else
if
(
!
empty
(
$_
[
'invalidpassword'
]))
{
?>
<p
class=
"warning"
>
<?php
p
(
$l
->
t
(
'Wrong password.'
));
?>
</p>
<?php
}
?>
<?php
if
(
$_
[
'rememberLoginAllowed'
]
===
true
)
:
?>
<?php
if
(
$_
[
'rememberLoginAllowed'
]
===
true
)
:
?>
<div
class=
"remember-login-container"
>
<div
class=
"remember-login-container"
>
<input
type=
"checkbox"
name=
"remember_login"
value=
"1"
id=
"remember_login"
class=
"checkbox checkbox--white"
>
<input
type=
"checkbox"
name=
"remember_login"
value=
"1"
id=
"remember_login"
class=
"checkbox checkbox--white"
>
...
...
This diff is collapsed.
Click to expand it.
lib/private/util.php
+
6
−
0
View file @
f8f3c9ec
...
@@ -947,6 +947,12 @@ class OC_Util {
...
@@ -947,6 +947,12 @@ class OC_Util {
$parameters
[
'redirect_url'
]
=
$_REQUEST
[
'redirect_url'
];
$parameters
[
'redirect_url'
]
=
$_REQUEST
[
'redirect_url'
];
}
}
$parameters
[
'canResetPassword'
]
=
true
;
$user
=
\OC
::
$server
->
getUserManager
()
->
get
(
$_REQUEST
[
'user'
]);
if
(
$user
instanceof
IUser
)
{
$parameters
[
'canResetPassword'
]
=
$user
->
canChangePassword
();
}
$parameters
[
'alt_login'
]
=
OC_App
::
getAlternativeLogIns
();
$parameters
[
'alt_login'
]
=
OC_App
::
getAlternativeLogIns
();
$parameters
[
'rememberLoginAllowed'
]
=
self
::
rememberLoginAllowed
();
$parameters
[
'rememberLoginAllowed'
]
=
self
::
rememberLoginAllowed
();
\OC_Hook
::
emit
(
'OC_Util'
,
'pre_displayLoginPage'
,
array
(
'parameters'
=>
$parameters
));
\OC_Hook
::
emit
(
'OC_Util'
,
'pre_displayLoginPage'
,
array
(
'parameters'
=>
$parameters
));
...
...
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