cloudpanel.user.password_reset
A user password was reset successfully.
Emitted once the CloudPanel CLI finishes updating the password.
Use cases
- Notify user
- Session invalidation hooks
Example
Registration and handler
Register
hook!(host, PluginEvent::CloudPanelUserPasswordReset, on_password_reset);Handler
extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
let ctx = unsafe { &*ctx };
let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
let _json = std::str::from_utf8(payload).unwrap_or_default();
HookResult::r#continue()
}