Skip to content

Commit

Permalink
fixinf linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Feb 26, 2024
1 parent 6affb9a commit b501d5b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions includes/Listeners/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ public function view() {

/**
* Login
*
* @param String $user_login username
*
* @param WP_User $user logged in user info
*
*
* @param String $user_login username
*
* @param WP_User $user logged in user info
*
* @return void
*/
public function login( $user_login, $user ) {
$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"] ) ) {
$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' );
}
}
Expand All @@ -69,5 +69,4 @@ public function login( $user_login, $user ) {
public function logout() {
$this->push( 'logout' );
}

}

0 comments on commit b501d5b

Please sign in to comment.