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
57593a37
Commit
57593a37
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Log password reset attempts
parent
344c95fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class.staff.php
+15
-1
15 additions, 1 deletion
include/class.staff.php
setup/doc/signals.md
+31
-5
31 additions, 5 deletions
setup/doc/signals.md
with
46 additions
and
6 deletions
include/class.staff.php
+
15
−
1
View file @
57593a37
...
...
@@ -719,9 +719,23 @@ class Staff {
if
(
!
(
$email
=
$cfg
->
getAlertEmail
()))
$email
=
$cfg
->
getDefaultEmail
();
$info
=
array
(
'email'
=>
$email
,
'vars'
=>
&
$vars
);
$info
=
array
(
'email'
=>
$email
,
'vars'
=>
&
$vars
,
'log'
=>
true
);
Signal
::
send
(
'auth.pwreset.email'
,
$this
,
$info
);
if
(
$info
[
'log'
])
$ost
->
logWarning
(
'Staff Password Reset'
,
sprintf
(
'Password reset was attempted for staff member: %s<br><br>
Requested-User-Id: %s<br>
Source-Ip: %s<br>
Email-Sent-To: %s<br>
Email-Sent-Via: %s'
,
$this
->
getName
(),
$_POST
[
'userid'
],
$_SERVER
[
'REMOTE_ADDR'
],
$this
->
getEmail
(),
$email
->
getEmail
()
),
false
);
$msg
=
$ost
->
replaceTemplateVariables
(
$template
->
asArray
(),
$vars
);
$_config
=
new
Config
(
'pwreset'
);
...
...
This diff is collapsed.
Click to expand it.
setup/doc/signals.md
+
31
−
5
View file @
57593a37
...
...
@@ -56,7 +56,25 @@ the signal handler should be called.
Signals in osTicket
-------------------
**auth.login.succeeded**
#### ajax.client
Sent before an AJAX request is processed for the client interface
Context:
Object
<Dispatcher>
- Dispatcher used to resolve and service the request
Parameters:
(none)
#### ajax.scp
Sent before an AJAX request is processed for the staff interface
Context:
Object
<Dispatcher>
- Dispatcher used to resolve and service the request
Parameters:
(none)
#### auth.login.succeeded
Sent after a successful login is process for a user
Context:
...
...
@@ -65,7 +83,7 @@ Object<StaffSession> - Staff object retrieved from the login credentials
Parameters:
(none)
**
auth.login.failed
**
####
auth.login.failed
Sent after an unsuccessful login is attempted by a user.
Context:
...
...
@@ -75,7 +93,7 @@ Arguments:
*
**username**
:
*read-only*
username submitted to the login form
*
**passowrd**
:
*read-only*
password submitted to the login form
**
auth.pwreset.email
**
####
auth.pwreset.email
Sent just before an email is sent to the user with the password reset token
Context:
...
...
@@ -85,8 +103,10 @@ Parameters:
*
**email**
:
*read-only*
email object used to send the email
*
**vars**
: (array) template variables used to render the password-reset
email template
*
**log**
: (bool) TRUE if a log should be appended to the system log
concerning the password reset attempt
**
auth.pwreset.login
**
####
auth.pwreset.login
Sent just before processing the automatic login for the staff from the link
and token provided in the password-reset email. This signal is only sent if
the token presented is considered completely valid and the password for the
...
...
@@ -99,7 +119,7 @@ Parameters:
*
**page**
: Page / URL sent in the redirect to the user. In other words,
the next page the staff will see.
**
auth.pwchange
**
####
auth.pwchange
Sent when the password for a user is changed
Context:
...
...
@@ -107,3 +127,9 @@ Object<Staff> - Staff whose password is being changed
Parameters:
*
**password**
: New password (clear-text) for the user
#### cron
Sent at the end of a cron run
Context:
null
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