Project

General

Profile

Actions

Feature proposal #4237

closed

Implement additional triggers

Added by krileon about 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
10 September 2013
Due date:
% Done:

100%

Estimated time:
0:00 h

Description

All access denied pages throw an error and go to a blank page. There should be a trigger fired before this happens so CB Auto Actions, plugins, etc.. can intercept the denied access and send to or display whatever they like. As is you have to make core modifications to change the redirect.

Actions #1

Updated by krileon about 11 years ago

Add trigger to authentication API just inside of if ( $resultError ) { as "onFailedLogin" so failed login messages can be intercepted or failed logins can be redirected, etc..

Actions #2

Updated by krileon about 11 years ago

onLoginFailed

Fired during authentication when login process has $loggedIn as false. Provides $resultError and $returnURL by reference.

Actions #3

Updated by krileon about 11 years ago

onUserModerator

Fired when isModerator is used (executes get_user_moderator) to check user moderator access. Provides $user_id for the user being checked and provides $isModerator by reference so moderator access can be overridden.

Actions #4

Updated by krileon about 11 years ago

onUserPermissionTask

Fires when a user permission for a task is checked (profile edit for example). Provides $user_id for the user being checked and $action for the action checked. Provides $ret so the permission can be overridden (set to null for access).

Actions #5

Updated by krileon about 11 years ago

onUsersPermission

Fires when a list of users permissions are being checked. Provides $user_ids, $action, and $allow_myself. Provides $msg by reference to override permission success (set to null to allow).

Actions #6

Updated by krileon about 11 years ago

onUserSuperAdmin

Fired when amIaSuperAdmin is used to check user super admin access. Provides $userId for the user being checked and provides $isSuperAdmin by reference so super admin access can be overridden.

Actions #7

Updated by krileon about 11 years ago

onBeforeUserProfileEditRequest

Fired when attempting to edit a users profile. Provides $uid (user id) for the user being edited. Provides $msg by reference to override profile edit access errors (set to null for access). Variable 3 holds $ui as trigger fires on frontend and backend. Use variable 3 to determine which location you want to target.

Actions #8

Updated by krileon about 11 years ago

onBeforeUserProfileSaveRequest

Fired when attempt to save a users profile. Provides $uid (user id) for the user being saved. Provides $msg by reference to override profile save access errors (set to null for access). Variable 3 holds $ui as trigger fires on frontend and backend. Use variable 3 to determine which location you want to target.

Actions #9

Updated by krileon about 11 years ago

onAfterUserProfileSaved

Fired when profile edit is successfully saved. This is different from the profile update triggers because this specifically and only fires when profile edit it self is used. So API calls to save a profile do not fire this. This is very useful for redirecting after a profile edit only. Provides $userComplete for the user saved and provides $ui for the location the save occurred (1 for frontend and 2 for backend).

Actions #10

Updated by krileon about 11 years ago

onAfterUserProfileSaveFailed

Fired when profile edit save fails due to an error. This is different from the other profile update triggers as it only fires when profile edit directly fails. Provides $userComplete for the user that failed to save, $regErrorMSG by reference which contains the error returned, and $ui for the location (1 for frontend and 2 for backend).

Actions #11

Updated by krileon about 11 years ago

REMOVED

Actions #12

Updated by krileon about 11 years ago

onBeforeUserProfileAccess

Fired much earlier in access check of a users profile. We can't use onBeforeUserProfileRequest as it's already used. This trigger is fired before a profile access error check is output so you can replace the error message, force profile access, or add a custom redirect for example. Provides $uid (user id), $msg by reference which contains the error message if any (set to null to allow access), and $ui for location (always 1 for frontend).

Actions #13

Updated by krileon about 11 years ago

onAfterPasswordReminder

Fired after a successful or failed password reminder usage. Provides $user_id of the founder user, $newpass for the new password for the user, and $res by reference if the reminder failed or was successful.

Actions #14

Updated by krileon about 11 years ago

onAfterUserRegistrationSaveFailed

Fired when a registration attempt fails directly after saving. This is different from the normal registration trigger as it fires right before profile form is re-displayed and applies only to physical registrations (so not fired by api calls). Provides $userComplete by reference of the user being registered, $regErrorMSG by reference of any error output, and $ui for the location (1 for frontend and 2 for backend).

Actions #15

Updated by krileon about 11 years ago

onAfterSaveUserRegistration

Fired right before registration success message is displayed. This is different from the normal after registration trigger as it only fires for physical registrations and only after the entire registration process is done. This can be used to redirect to a custom success page, auto login, etc.. Provides $userComplete by reference of the user registered, $messagesToUser by reference of the messages array to display, and $ui for location (1 for frontend and 2 for backend).

Actions #16

Updated by krileon about 11 years ago

onAfterUserLoginFailed

Fired directly after a physical frontend login failed. This is useful to affect frontend login form/module usage without having to affect API usage (like from CB Connect). Provides $username, $password, $return by reference, $alertmessages by reference, $messagesToUser by reference, and $resultError by reference.

Actions #17

Updated by krileon about 11 years ago

onAfterUserLoginSuccess

Fired directly after a physical frontend login was successful. This is useful to affect frontend login form/module usage without having to affect API usage (like from CB Connect). Provides $username, $password, $return by reference, $alertmessages by reference, $messagesToUser by reference, and $resultError by reference.

Actions #18

Updated by krileon about 11 years ago

onAfterUserLogoutSuccess

Fired directly after successful physical logout. This will not fire for API logouts, but only for login form logouts. This is useful for redirecting or altering logout messages directly after a physical logout. Provides $return by reference (url to redirect the user to), $message by reference (true/false to display a message or not), $messageToUser by reference as the message to display.

Actions #19

Updated by krileon about 11 years ago

onAfterUserLogoutFailed

Fired directly after a physical logout failed. This is only fired if logout from login form fails. Provides $resultError by reference containing the logout error message.

Actions #20

Updated by krileon about 11 years ago

onAfterUserConfirmation

Fired directly after a users confirms on frontend just before the message is echoed. This allows a redirect to be added, the message to be altered, etc.. Provides $user by reference, $confirmcode, $confirmed, $class by reference as the message html class, and $messagesToUser by reference as the message array to display.

Actions #21

Updated by krileon about 11 years ago

onBeforeReportUserForm

Fired directly before the report user form is rendered. Provides $form, $uid, $reportedByUser, and $reportedUser.

Actions #22

Updated by krileon about 11 years ago

onBeforeReportUserFormDisplay

Fired directly before the report form is actually displayed. Contains $uid, $reportedByUser, and $reportedUser.

Actions #23

Updated by krileon about 11 years ago

onStartSaveReportUser

Fired directly before a report user request is saved. Contains &$row, $reportedByUser, and $reportedUser.

Actions #24

Updated by krileon about 11 years ago

onAfterSaveReportUser

Fired after a report user request is saved, but before success message is displayed. Contains &$row, $reportedByUser, and $reportedUser.

Actions #25

Updated by krileon about 11 years ago

onBeforeSaveReportUser

Fired directly before a report user request is saved. Contains &$row, &$reportedByUser, and &$reportedUser.

Actions #26

Updated by krileon about 11 years ago

onBeforeBanUserForm

Fired before moderator ban form is displayed. Contains $uid, &$bannedByUser, and &$bannedUser.

Actions #27

Updated by krileon about 11 years ago

onBeforeBanUserFormDisplay

Fired directly before the moderator ban form is actually displayed. Contains $uid, &$orgBannedReason, &$bannedByUser, and &$bannedUser.

Actions #28

Updated by krileon about 11 years ago

onBeforeUserBan

Fired directly before a user ban state is saved. Contains &$this, &$state, &$by, and &$reason.

Actions #29

Updated by krileon about 11 years ago

onAfterUserBan

Fired directly after a user ban state is saved. Contains &$this, &$state, &$by, and &$reason.

Actions #30

Updated by krileon about 11 years ago

REMOVED

Actions #31

Updated by krileon about 11 years ago

REMOVED

Actions #32

Updated by krileon about 11 years ago

REMOVED

Actions #33

Updated by krileon about 11 years ago

onBeforeManageConnectionsFormDisplay

Fired before the manage connections form is actually rendered. Contains &$connections, &$actions, &$total, &$connMgmtTabs, &$pagingParams, &$perpage, and &$connecteds.

Actions #34

Updated by krileon about 11 years ago

onBeforeModerateImagesFormDisplay

Fired directly before the moderator image approval form is actually rendered. Does not contain any variables.

Actions #35

Updated by krileon about 11 years ago

onBeforePendingApprovalUsersFormDisplay

Fired directly before the pending users approval form is actually rendered. Contains &$users.

Actions #36

Updated by krileon about 11 years ago

Fired directly after toolbar html is created and directly before toolbar html ends. Contains $_CB_Backend_task and $_CB_Backend_Menu.

onBeforeToolbar
onAfterToolbar

Actions #37

Updated by krileon about 11 years ago

onBeforeModerateReportsFormDisplay

Fired directly before the moderator user reports form is actually rendered. Does not contain any variables.

Actions #38

Updated by krileon about 11 years ago

onBeforeViewReportsFormDisplay

Fired directly before the view user reports form is actually rendered. Contains $uid and $act.

Actions #39

Updated by krileon almost 11 years ago

onBeforeModerateBansFormDisplay

Fired directly before the bans form is actually rendered. Contains $uid and $act.

Actions #40

Updated by krileon almost 11 years ago

onConfigurationDisplay

Fires during CB configuration display. This allows extending CB configuration with new parameters using CB plugins. This plugin expects an array response to divide it into multiple sections. The sections are: tab (helps add a new config tab), general, registration, userlist, userprofile, images, moderation, connections, integration. Contains &$ueConfig, &$lists, $tabs.

Actions #41

Updated by krileon almost 11 years ago

onAfterRegisterFormDisplay

Fires directly after the registration form has been displayed. Contains $user and $tabcontent. Behaves same as after profile edit display trigger except for registration.

Actions #42

Updated by krileon almost 11 years ago

onBeforeSendEmailMSG

Fires directly before a notification API email is sent. Contains $this, &$to, &$from, &$sub, &$msg, &$addPrefix, &$mode, &$cc, &$bcc, &$attachment.

Actions #43

Updated by krileon almost 11 years ago

onAfterSendEmailMSG

Fired directly after a notification API email is sent. Contains $result, $this, $to, $from, $sub, $msg, $addPrefix, $mode, $cc, $bcc, $attachment.

Actions #44

Updated by krileon almost 11 years ago

onBeforeRegisterFormRequest

Fired directly before the frontend registration form is requested. Contains &$msg, $emailpass, &$regErrorMSG. If $msg has a value then form access will be denied.

Actions #45

Updated by krileon almost 11 years ago

onBeforeSaveUserRegistrationRequest

Fired directly before frontend registration save is requested. Contains &$msg. If $msg has a value then save access will be denied.

Actions #46

Updated by krileon almost 11 years ago

onBeforeUserConfirmationRequest

Fired directly before confirmation request is processed. It contains no variables.

Actions #47

Updated by krileon almost 11 years ago

onBeforeReportUserRequest

Fired directly before a report user request (could be form or save). Contains $uid, &$msg, $form. If $msg has a value then access will be denied.

Actions #48

Updated by krileon almost 11 years ago

onBeforeBanUserRequest

Fired directly before user ban request (could be form or save). Contains $uid, &$msg, $form, $act. If $msg has a value then access will be denied.

Actions #49

Updated by krileon almost 11 years ago

onBeforeAddConnectionRequest

Fired before a frontend connection request is made. Contains $userid, $connectionid, &$msg, &$umsg, $act. If $msg has a value then access will be denied.

Actions #50

Updated by krileon almost 11 years ago

onBeforeRemoveConnectionRequest

Fired directly before a frontend remove connection request is made. Contains $userid, $connectionid, &$msg, $act. If $msg has a value then access will be denied.

Actions #51

Updated by krileon almost 11 years ago

onBeforeDenyConnection

Fired directly before a frontend deny connection request is made. Contains $userid, $connectionid, &$msg, $act. If $msg has a value then access will be denied.

Actions #52

Updated by krileon almost 11 years ago

onBeforeAcceptConnection

Fired directly before a frontend accept connection request is made. Contains $userid, $connectionid, &$msg, $act. If $msg has a value then access will be denied.

Actions #53

Updated by krileon almost 11 years ago

onBeforeManageConnectionsRequest

Fired directly before a frontend manage connections request is made. Contains $userid and &$msg. If $msg has a value then access will be denied.

Actions #54

Updated by krileon almost 11 years ago

onBeforeSaveConnectionsRequest

Fired directly before a frontend save connections request is made. Contains $connectionids and &$msg. If $msg has a value then access will be denied.

Actions #55

Updated by krileon almost 11 years ago

onBeforeProcessConnectionsRequest

Fired directly before a frontend process connections request is made. Contains $connectionids and &$msg. If $msg has a value then access will be denied.

Actions #56

Updated by krileon over 10 years ago

onBeforeCreateMailer

Fired directly before a CB mailer object is populated with data. Contains &$mail, &$from, &$fromname, &$subject, &$body.

Actions #57

Updated by krileon over 10 years ago

onAfterCreateMailer

Fired directly after a mailer object is created and populated with data. Contains &$mail, $from, $fromname, $subject, $body.

Actions #58

Updated by krileon over 10 years ago

onBeforeSendMail

Fired before a mail is sent by CB. Contains &$mail, &$from, &$fromname, &$recipient, &$subject, &$body, &$mode, &$cc, &$bcc, &$attachment, &$replyto, &$replytoname, &$properties, &$error.

Actions #59

Updated by krileon over 10 years ago

onAfterSendMail

Fired after an email is sent by CB. Contains $mailsSent, $mail, $from, $fromname, $recipient, $subject, $body, $mode, $cc, $bcc, $attachment, $replyto, &$replytoname, $properties, $error.

Actions #60

Updated by beat over 10 years ago

  • Estimated time set to 0:00 h
Actions #61

Updated by krileon over 10 years ago

onAfterFirstLogin

Fired directly before onAfterLogin and behaves exactly the same except is only fired on first login. Contains &$row, $loggedIn.

Actions #62

Updated by beat over 10 years ago

  • Priority changed from Normal to Low
Actions #63

Updated by krileon about 10 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
Actions #64

Updated by beat about 10 years ago

  • Priority changed from Low to Normal
Actions #65

Updated by beat about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF