Maybe your friend was thinking about film cameras or thinking you meant to be pointing your camera right at the sun with telephoto lens? There could be any reasons why your friend warned you against doing it. But over the years in the history of photography, people have took photos where the sun had been in front of the camera, and many turned out to be fine.
If you and your friend are worried, then you can cut down the lenght of time you spend pointing your camera towards the sun by doing the following...
Use your hands to frame the subject, picture in your mind how you would like to frame the photo.
Use a light meter if you have one so you don't have to use camera's TTL metering.
If you do not have a light meter, then just point your camera in the general direction, don't waste time fine-tuning your framing, just get a rough frame, use camera's TTL metering to get settings, and take test photos.
When you are happy with your ideas of where to frame the picture and your choice of settings and options, then frame the scene the way you want it, and take photos.
That way, you just try to miniumise the amount of time you keep pointing your camera at the sun. If your friend warns you again, just tell your friend that you're only spending a few seconds pointing your camera towards the sun to take the photos, and that it's not like you're taking minutes and minutes, trying to get the best view, and still trying to get metering right.