0

I have used this tutorial for 'sign in with google' on my website. http://tutorialzine.com/2012/08/build-a-one-click-registration-form-powered-by-google/

I am not a programmer really but just download the code in there and followed the steps in there. It works fine. Now I want all logged in users with their profile pic displayed as a list. This should be visible to anyone on the website. If a user logs out, he should be removed from the list. Can someone point me to an article or help me please?

My website login page

1 Answers1

0

You need to learn little bit of programming to do so.. first you need to create a database table which will store the value for logged in users.. I checked the code , so when a user loggs in to your website than his user_id is been saved to the session_variable.. so you can insert his/her user_id to your database table and you can use a login flag lets say true or false so if the user_id is there in the session_variable than the flag should be true and when the user loggs out than you can update the flag to false.. So by using this you can achive your desired thing. . but some developing knowledge is must to do so..

Nishant Solanki
  • 2,119
  • 3
  • 19
  • 32
  • thanks! this gives me a direction to move in. i'll probably get a developer do this for me if i am not able to. Currently the database does not store the user's google profile image but only has a URL pointing to some Google's domain. You checked the code, looking at it, will google allow to pull a user's profile pic using that url even when the user is not logged in to my website? Hope I am making sense. – Spooster.com Mar 10 '14 at 06:43
  • yes you can.. Please have a look at this link.. http://stackoverflow.com/questions/724391/saving-image-from-php-url-using-php – Nishant Solanki Mar 10 '14 at 06:45
  • I don't want to save a copy of the image. I just want to know if I am allowed to fetch the image of a google account holder from google's servers even when that user is not logged in to my website. – Spooster.com Mar 10 '14 at 06:51
  • just try putting `user's profile image URL` to your browser link.. and if the link shows user image without any error than you can... :) – Nishant Solanki Mar 10 '14 at 06:53