Skip to content

Commit

Permalink
refactor events
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Dec 3, 2022
1 parent 84063b9 commit 9f5401a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Services/Users/UserEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ public function process(): \Illuminate\Database\Eloquent\Model
// invoke OnBeforeUserFormSave event
if ($this->events) {
EvolutionCMS()->invokeEvent("OnBeforeUserSave", [
"mode" => "upd",
"user" => &$this->userData,
"mode" => "upd",
"user" => &$this->userData,
'userid' => $this->userData['id'],
"username" => $this->userData['username'],
]);
}

Expand Down
1 change: 1 addition & 0 deletions src/Services/Users/UserLoginById.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function process(): \Illuminate\Database\Eloquent\Model
// invoke OnBeforeManagerLogin event
EvolutionCMS()->invokeEvent('OnBeforeUserLogin', array(
'username' => $this->user->username,
'userpassword' => ''
));
}

Expand Down
1 change: 1 addition & 0 deletions src/Services/Users/UserRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function process(): \Illuminate\Database\Eloquent\Model
EvolutionCMS()->invokeEvent("OnBeforeUserSave", [
"mode" => "new",
"user" => &$this->userData,
'username' => $this->userData['username']
]);
}

Expand Down

0 comments on commit 9f5401a

Please sign in to comment.