zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

Telegram not providing first and last name #438

Closed ratte1303 closed 7 months ago

ratte1303 commented 7 months ago

I succesfully implemented Telegram Login into my nextcloud. The problem is that only the username is being transferred and put into the real name field. Firts and last name are not being transferred. If you have no username set the id is set as username which is very unconvinient :(

Somone got an idea how to get working first and last name into nextcloud?

ratte1303 commented 7 months ago

Found a solution: changed sociallogin/3rdparty/hybridauth/hybridauth/src/Provider/Telegram.php

replaced: $userProfile->displayName = $data->get('username'); ---> $userProfile->displayName = $data->get('first_name');

Now the first name shows as full name in nextcloud which is exactly what I wanted :)