문제

I have this situation where user login via facebook needs to check on the $_SERVER['HostName'] as in the database user table that keep records of particular user details might have more than one row. The difference is by the "hostname" (to differentiate which subdomain from).

In this situation I can login user with facebook without checking hostname when it comes to hostname I don't know where should I integrate the check of "hostname".

Any details that is needed to help understand the situation? I have been looking around for 2 days and no luck on the solution :/

Facebook plugin from here

도움이 되었습니까?

해결책

I'm not really sure how you're using the hostname for the users, but I think you can use the scope setting to add the condition you're looking for:

'SocialSignIn.Facebook' => array(
    ...
    'scope' => array('User.hostname' => $_SERVER['SERVER_NAME']), // or $_SERVER['SERVER_ADDR']
    ...
)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top