You are here

function photos_user_load in Album Photos 8.4

Same name and namespace in other branches
  1. 8.5 photos.module \photos_user_load()
  2. 7.3 photos.module \photos_user_load()
  3. 6.0.x photos.module \photos_user_load()

Implements hook_ENTITY_TYPE_load().

File

./photos.module, line 912
Implementation of photos.module.

Code

function photos_user_load($users) {
  foreach ($users as $account) {

    // @todo rename album to photos?
    $account->album['album']['count'] = PhotosAlbum::getCount('user_album', $account
      ->id());
    $account->album['image']['count'] = PhotosAlbum::getCount('user_image', $account
      ->id());
  }
}