File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -146,29 +146,25 @@ function main()
146
146
}
147
147
}
148
148
149
- var uresults = search . query ( {
150
- language : "lucene" ,
151
- store : "user://alfrescoUserStore" ,
152
- query : "PATH:\"/\\{http\\://www.alfresco.org/model/system/1.0\\}system/\\{http\\://www.alfresco.org/model/system/1.0\\}people/\\{http\\://www.alfresco.org/model/user/1.0\\}user\" +@\\{http\\://www.alfresco.org/model/user/1.0\\}username:" + user . properties . userName
153
- } ) ;
154
-
155
- // Check that the user is local (i.e. not an LDAP user)
156
- if ( uresults . length != 1 )
149
+ // Reset the password
150
+ try
151
+ {
152
+ u = resetPassword ( userToObject ( user ) ) ;
153
+ }
154
+ catch ( e )
157
155
{
158
156
status . setCode ( status . STATUS_BAD_REQUEST , msg . get ( "error.notLocal" ) ) ;
159
157
status . redirect = true ;
160
158
return ;
161
159
}
162
160
163
- // Reset the password
164
- u = resetPassword ( userToObject ( user ) ) ;
165
-
166
161
// Send e-mail confirmation
167
162
try
168
163
{
169
164
mailResetPasswordNotification ( u ) ;
170
165
}
171
- catch ( e ) {
166
+ catch ( e )
167
+ {
172
168
status . setCode ( status . STATUS_INTERNAL_SERVER_ERROR , msg . get ( "error.mail" ) ) ;
173
169
status . redirect = true ;
174
170
return ;
Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ error.notFound=No user found with e-mail address {0}
15
15
error.multiple =Multiple users found. Please contact an administrator to reset your password.
16
16
error.disabled =Could not reset the password as the user is disabled
17
17
error.disallowed =Password resets are disallowed for this user
18
- error.notLocal =Could not reset the password as the user is not a local user. Please contact an administrator to reset your password.
18
+ error.notLocal =Could not reset the password - is this a directory user? Please contact an administrator to reset your password.
19
19
error.mail =Could not reset the password as an e-mail confirmation could not be sent
You can’t perform that action at this time.
0 commit comments