Existing WP user Login logic and two code questions
-
Hi there!
Well done on what seems to be the most solid and comprehensive social login plugin in the free category.
We have an existing woocommerce store, and we want to:
1) Allow social login for NEW “customer” users, but also,
2) Allow social login for EXISTING “customer” / “wholesaler” usersThe questions are a bit detailed, but this could be very valuable for other users as well.
Question set 1:
If an EXISTING WP user, wants to use social login, how would this work if:
1) Their WP user_email is exactly the same as the social_email?
2) Their WP user_email is different than the social_email? E.g. would they be able to link their WP profile to a particular social profile? If they are able to “link” – is the WP user_email overwritten with the social_email?Question set 2:
super_socializer.php function the_champ_connect // some in between code here $googleLoginState = mt_rand(); update_user_meta($googleLoginState, ...);
It looks like you are updating user_meta of a random user_id. Isn’t this sort of dangerous? Perhaps you can just explain how this works.
Question set 3:
social_login.php function the_champ_user_auth // some in between code here $existingUsers = get_users('meta_key=...&meta_value='.$profileData['id']); // some logic here wp_delete_user($existingUser[0]->ID);
Could this not cause an EXISTING “customer” user with additional user info and orders, to lose all their data? Perhaps you can just explain under what circumstances users are deleted in this way?
Thank you and all the best
Ernst
- The topic ‘Existing WP user Login logic and two code questions’ is closed to new replies.