Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions includes/Core/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
return;
}

// $api_key = get_user_meta( $user_id, 'wemail_api_key', true );

Check warning on line 72 in includes/Core/User/User.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 59% valid code; is this commented out code?
$api_key = get_option( 'wemail_api_key' );
$api_key = apply_filters( 'wemail_api_key', $api_key, $user_id );

Expand All @@ -92,14 +92,13 @@
*
* @return bool
*/
public function can( $permission ) {

Check warning on line 95 in includes/Core/User/User.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

The method parameter $permission is never used
// if ( $this->permissions && array_key_exists( $permission, $this->permissions ) ) {
// return true;
// }
$wemail_api_key = get_option( 'wemail_api_key' );
if ( ! $wemail_api_key ) {
return false;
}

return $this->check_user_role( $this->user_id );

// return false;
}

public function check_user_role( $user_id ) {
Expand Down
Loading