Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
2a481de5
Commit
2a481de5
authored
11 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to force password change while registering the user.
parent
321b15b2
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
include/class.user.php
+2
-0
2 additions, 0 deletions
include/class.user.php
include/staff/templates/user-register.tmpl.php
+10
-1
10 additions, 1 deletion
include/staff/templates/user-register.tmpl.php
with
12 additions
and
1 deletion
include/class.user.php
+
2
−
0
View file @
2a481de5
...
@@ -768,6 +768,8 @@ class UserAccount extends UserAccountModel {
...
@@ -768,6 +768,8 @@ class UserAccount extends UserAccountModel {
if
(
$vars
[
'passwd1'
]
&&
!
$vars
[
'sendemail'
])
{
if
(
$vars
[
'passwd1'
]
&&
!
$vars
[
'sendemail'
])
{
$account
->
set
(
'passwd'
,
Password
::
hash
(
$vars
[
'passwd1'
]));
$account
->
set
(
'passwd'
,
Password
::
hash
(
$vars
[
'passwd1'
]));
$account
->
setStatus
(
self
::
CONFIRMED
);
$account
->
setStatus
(
self
::
CONFIRMED
);
if
(
$vars
[
'pwreset-flag'
])
$account
->
setStatus
(
self
::
PASSWD_RESET_REQUIRED
);
}
}
$account
->
save
(
true
);
$account
->
save
(
true
);
...
...
This diff is collapsed.
Click to expand it.
include/staff/templates/user-register.tmpl.php
+
10
−
1
View file @
2a481de5
...
@@ -47,7 +47,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div>
...
@@ -47,7 +47,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div>
<td>
<td>
<input
type=
"checkbox"
id=
"sendemail"
name=
"sendemail"
value=
"1"
<input
type=
"checkbox"
id=
"sendemail"
name=
"sendemail"
value=
"1"
<?php
echo
$info
[
'sendemail'
]
?
'checked="checked"'
:
''
;
?>
>
<?php
echo
$info
[
'sendemail'
]
?
'checked="checked"'
:
''
;
?>
>
Send account
confirm
ation email to
user
.
Send account
activ
ation email to
<?php
echo
$user
->
getEmail
();
?>
.
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -82,6 +82,15 @@ $user->getName()->getOriginal(); ?></b>.</p></div>
...
@@ -82,6 +82,15 @@ $user->getName()->getOriginal(); ?></b>.</p></div>
<span
class=
"error"
>
<?php
echo
$errors
[
'passwd2'
];
?>
</span>
<span
class=
"error"
>
<?php
echo
$errors
[
'passwd2'
];
?>
</span>
</td>
</td>
</tr>
</tr>
<tr>
<td>
Password Change:
</td>
<td
colspan=
2
>
<input
type=
"checkbox"
name=
"pwreset-flag"
value=
"1"
<?php
echo
$info
[
'pwreset-flag'
]
?
'checked="checked"'
:
''
;
?>
>
Require password change on login
</td>
</tr>
</tbody>
</tbody>
<tbody>
<tbody>
<tr>
<tr>
...
...
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