function photos_user_load in Album Photos 6.0.x
Same name and namespace in other branches
- 8.5 photos.module \photos_user_load()
- 8.4 photos.module \photos_user_load()
- 7.3 photos.module \photos_user_load()
Implements hook_ENTITY_TYPE_load().
File
- ./
photos.module, line 699 - 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());
}
}