code standards

This commit is contained in:
Max Rice 2015-01-19 00:33:38 -05:00
parent 1f62a53e0e
commit 512d77fb4c
1 changed files with 7 additions and 5 deletions

View File

@ -36,15 +36,17 @@ class WC_API_Authentication {
public function authenticate( $user ) {
// allow access to the index by default
if ( '/' === WC()->api->server->path )
if ( '/' === WC()->api->server->path ) {
return new WP_User( 0 );
}
try {
if ( is_ssl() )
if ( is_ssl() ) {
$user = $this->perform_ssl_authentication();
else
} else {
$user = $this->perform_oauth_authentication();
}
// check API key-specific permission
$this->check_api_key_permissions( $user );