Hi,
Sorry we missed answering this question.
Do you only need the code to add this image before login? Or do you require code that adds the image after login as well?
Cheers
Mary
i want the code to add image shadow before and after login that will defautly appears until the user not uplod his/her pic....
as it appears in my id i m login the shadow image appears because i have not upload my profile pic like this i want the code to add the shadow image???? untill an unless user upload his pic....
Hi,
I have just deleted a duplicate post for this question you added. We have had holidays here in the UK this weekend so we don't always answer all questions. I tend to answer the easy ones, whereas this question is more complex.
If you can bare with me while I search for the fix you want I will post it shortly.
Thank you
Mary
<?php
if (!isloggedin() or isguestuser()) {
echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>80)), array('class'=>'userimg'));
} else {
echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>80)), array('class'=>'userimg'));
}
?>
that code doesn't look quite right Mary - you if and else statements are doing the same exact thing, negating the need for the if/else at all.
hello!
mary
i m getting this kind of error
Coding error detected, it must be fixed by a programmer: User id is required when printing user avatar image.
how can i fix it???
plz provide me the right code