src/User.php
public function getEmailFromUser()
    {
        $email = null;
        try {
            $email = $this->email;
        } catch (\Exception $e){
            return $this->getEmailFromPerson($this->person_id);
        }
        if(!$email) {
            return $this->getEmailFromPerson($this->person_id);
        }
        return $email;
    }
public function getEmailFromUser()
    {
        $email = null;
        try {
            $email = $this->email;
        } catch (\Exception $e){
            return $this->getEmailFromPerson($this->person_id);
        }
        if(!$email) {
            return $this->getEmailFromPerson($this->person_id);
        }
        return $email;
    }
public function getEmailFromUser ( ) { $ email = null ; try { $ email = $ this -> email ; } catch ( \ Exception $ e ) { return $ this -> getEmailFromPerson ( $ this -> person_id ) ; } if ( ! $ email ) { return $ this -> getEmailFromPerson ( $ this -> person_id ) ; } return $ email ; }
Get email from user.

@param $user
@return null
Get email from user .