mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-13851 Added a UserWasCreated hook for server-side plugins (#10178)
This commit is contained in:
@@ -32,6 +32,7 @@ const (
|
||||
FileWillBeUploadedId = 14
|
||||
UserWillLogInId = 15
|
||||
UserHasLoggedInId = 16
|
||||
UserHasBeenCreatedId = 17
|
||||
TotalHooksId = iota
|
||||
)
|
||||
|
||||
@@ -71,6 +72,18 @@ type Hooks interface {
|
||||
// API.
|
||||
ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
|
||||
|
||||
// UserHasBeenCreated is invoked after a user was created.
|
||||
//
|
||||
// Minimum server version: 5.10
|
||||
UserHasBeenCreated(c *Context, user *model.User)
|
||||
|
||||
// UserWillLogIn before the login of the user is returned. Returning a non empty string will reject the login event.
|
||||
// If you don't need to reject the login event, see UserHasLoggedIn
|
||||
UserWillLogIn(c *Context, user *model.User) string
|
||||
|
||||
// UserHasLoggedIn is invoked after a user has logged in.
|
||||
UserHasLoggedIn(c *Context, user *model.User)
|
||||
|
||||
// MessageWillBePosted is invoked when a message is posted by a user before it is committed
|
||||
// to the database. If you also want to act on edited posts, see MessageWillBeUpdated.
|
||||
//
|
||||
@@ -126,13 +139,6 @@ type Hooks interface {
|
||||
// If actor is not nil, the user was removed from the team by the actor.
|
||||
UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
|
||||
|
||||
// UserWillLogIn before the login of the user is returned. Returning a non empty string will reject the login event.
|
||||
// If you don't need to reject the login event, see UserHasLoggedIn
|
||||
UserWillLogIn(c *Context, user *model.User) string
|
||||
|
||||
// UserHasLoggedIn is invoked after a user has logged in.
|
||||
UserHasLoggedIn(c *Context, user *model.User)
|
||||
|
||||
// FileWillBeUploaded is invoked when a file is uploaded, but before it is committed to backing store.
|
||||
// Read from file to retrieve the body of the uploaded file.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user