user pic

user pic

by vaibhav katariya -
Number of replies: 7
how can i add the default shadow image before the You are logged in as Admin User   which changes  when the user uploads his or her pic and login ?


Average of ratings: -
In reply to vaibhav katariya

Re: user pic

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

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

In reply to Mary Evans

Re: user pic

by vaibhav katariya -

i want the code to add image shadow before and after login that will defautly appears until the user not uplod his/her pic....

In reply to vaibhav katariya

Re: user pic

by vaibhav katariya -

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....


In reply to vaibhav katariya

Re: user pic

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

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

In reply to vaibhav katariya

Re: user pic

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

    <?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'));
}
    ?>




In reply to Mary Evans

Re: user pic

by Danny Wahl -

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.

In reply to Mary Evans

Re: user pic

by vaibhav katariya -

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