Skip to content

Commit

Permalink
User favorites added back in get favorites method.
Browse files Browse the repository at this point in the history
  • Loading branch information
kylephillips committed Mar 24, 2015
1 parent 4fd2b8f commit 30b444e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/Entities/User/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public function getFavorites()
{
$saveType = $this->settings_repo->saveType();

// if ( is_user_logged_in() ) {
// $favorites = get_user_meta(get_current_user_id(), 'simplefavorites');
// if ( empty($favorites) ) return array();
// return $favorites[0];
// }
if ( is_user_logged_in() ) {
$favorites = get_user_meta(get_current_user_id(), 'simplefavorites');
if ( empty($favorites) ) return array();
return $favorites[0];
}
$favorites = ( $saveType == 'cookie' ) ? $this->getCookieFavorites() : $this->getSessionFavorites();
return $favorites;
}
Expand Down

0 comments on commit 30b444e

Please sign in to comment.