Skip to content

Commit

Permalink
For login event, send loggedin user's email
Browse files Browse the repository at this point in the history
  • Loading branch information
girish-lokapure committed Dec 16, 2024
1 parent ee5d861 commit c1da97e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Listeners/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function view() {
public function login( $user_login, $user ): void {
$is_admin = array_key_exists( 'administrator', $user->get_role_caps() );
if ( ( $is_admin && $user->get_role_caps()['administrator'] ) || ( $user->get_role_caps() && $user->get_role_caps()['manage_options'] ) ) {
$this->push( 'login' );
$this->push( 'login', ["user_email" => $user->user_email]);
}
}

Expand Down

0 comments on commit c1da97e

Please sign in to comment.