Skip to content
Snippets Groups Projects
Commit ba460ec8 authored by Raghav Gupta's avatar Raghav Gupta
Browse files

by iflylabs: user picture bug fix

parent 956ed286
Branches 8.x-1.x
No related merge requests found
......@@ -741,7 +741,7 @@ class drupalchatController extends ControllerBase {
'#account' => $u,
);
if ((null !== $u->user_picture->first()) && is_object($u->user_picture->first())) {
if ((!empty($u->user_picture)) && (null !== $u->user_picture->first()) && (is_object($u->user_picture->first()))) {
$renderImage = $u->user_picture->first()->view('large');
$user_image = \Drupal::service('renderer')->renderPlain($renderImage);
$user_image = print_r($user_image, true);//(string)$row_user;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment