How know if user is visitor or logged and logged member username? in drupal 8 - drupal-modules

I having Drupal Experience last two month my requirement is to Display Welcome with its Username On Form Title it is possible to get its name?
I have tried to found from google but not succeed.
Thanks in advance

Check this link, you have explanation how to grab user object and its properties: https://drupal.stackexchange.com/questions/184498/how-do-i-get-the-user-id-for-the-currently-logged-in-user

Related

how to access Instagram user profile by using user id instead of username?

I need to scrape Instagram by user id number instead of username. How can I do it?
You can access user profile like this
https://instagram.com/{username}
but I need to access it like below. It doesn't have to be exactly like below. Is it possible to find such path?
https://instagram.com/{profile_id}
I don't think there's any possible way to do it.
Anyway, how do you get the profile_id. I thought it is not available to be seen anywhere?
you could send a GET request to this url
https://i.instagram.com/api/v1/users/<user_id>/info/
from its response you'll get the username and from that you can use your initial url
https://instagram.com/<username>/

Instafeed - Instagram: this user does not exist

I am using http://instafeedjs.com/ on my development site, I've got it to pull the most recent 20 photos with a username so I know my code is fine.
I have tried to register a different user to pull their details and I get the following error:-
Instagram: this user does not exist
I believe the User ID is correct, I got it from here http://jelled.com/instagram/lookup-user-id#
User ID: 1992159860
I have done the following:-
https://api.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT-URI&response_type=token&scope=public_content
And agreed to the popup asking me to authorize but I still get the user id is incorrect, when I put my other user id, it works so I don't understand what's wrong here?
Any suggestions?
Okay I realised what the problem was, for anyone who may get the same issue just go to:-
https://www.instagram.com/developer
Edit your client and click on the 'Sandbox' tab, and invite the username for the profile you are pulling information from under 'Sandbox Users'.
I basically was logged in to my developer account when I registered the application so I needed to invite the user it was pulling the information from.

Get user's gender on Instagram

I just wonder whether there's a way to get user's gender on instagram... I walked through instagram's api and for user's info got from users/userId doesn't include the gender info.
Thanks for your help.
NO, there is currently no way to get the gender of the instagram user from API
Instagram API does not work, they do not allow this anymore.
The thing you can do, is to scrape name of the user and then determine gender based on name. There is Python lib for this, you can find it here: https://pypi.org/project/gender/

How to know which users are logged in on TYPO3

Does anyone know if there is a way to do this, or an extension that displays who is logged in at the Front End and at the Back End.
Something that displays a list of the logged-in users (both fe_users and be_users).
Thanks.
In TYPO3 you can also check who is online in real-time :
Connect as Admin
Click on User Admin in ADMIN TOOLS part
Change Compare User Settings by List Users Online
You will see Who Is Online.
Check the demo site to try : http://demo.typo3.org
every user has his own session. Table be_session. Look at it. you got every info you need

How to pull all emails of the site members in og invite new members?

I have og installed in my drupal site. In the group detail block there is a link of invite new members. On clicking this link a form appears Where I have to enter email addresses manually.
Basically the idea is that I want to add a field in the og_invite_form and search for the users members using their names.
And then that user's email address should display in the email address field.
If someone have some idea then please tell me.
Thanks in Advance...
I was mistaken, it is actually the OG Username Helper module that adds the autocomplete field to the invite page.
And still if you install the RealName module it lets you type the firstname or lastname of the user and it will place their username in the textarea below. Make sure you give the appropriate permissions to the desired roles.

Resources