Problem/Motivation

getUserInfo() is invoked twice in returnFromFb(). Once to get the $fb_profile, then to get the mail field.

if (!$fb_profile = $this->facebookManager->getUserInfo()) {
if (!$email = $this->facebookManager->getUserInfo()->getEmail()) {

Proposed resolution

Call the function just once. The second time could just be:

if (!$email = $fb_profile->getEmail()) {

Comments

gvso created an issue. See original summary.

  • gvso committed 3fe5344 on 8.x-2.x
    Issue #2951007 by markus_petrux: Call getUserInfo() only once
    

gvso’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.