Get all the email addresses which are registered to a particular user ID

@param integer $id The user's ID

@return array
431045
public function getEmailsForUser($id)
    {
        $oDb = Factory::service('Database');
        $oDb->where('user_id', $id);
        $oDb->order_by('date_added');
        $oDb->order_by('email', 'ASC');
        return $oDb->get($this->tableEmail)->result();
    }
540826
public function resend($id)
    {
        $user = UserRepository::find($id);
        $this->checkUser($user);

        if ($user->activated) {
            return Redirect::route('account.resend')->withInput()
                ->with('error', 'That user is already activated.');
        }

        $code = $user->getActivationCode();

        $mail = [
            'url'     => URL::to(Config::get('credentials.home', '/')),
            'link'    => URL::route('account.activate', ['id' => $user->id, 'code' => $code]),
            'email'   => $user->getLogin(),
            'subject' => Config::get('app.name').' - Activation',
        ];

        Mail::queue('credentials::emails.resend', $mail, function ($message) use ($mail) {
            $message->to($mail['email'])->subject($mail['subject']);
        });

        return Redirect::route('users.show', ['users' => $id])
            ->with('success', 'The user\'s activation email has been sent successfully.');
    }
21126
public function pingHook(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/hooks/:id/pings',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_POST);
    }
1362630
private function _getAncectors($id)
    {
        $nodes = [];
        foreach ($this->_tree as $key => $value) {
            if ($value['id'] == $id) {
                $nodes[] = $value;
                if ($value[$this->_parentSign] != 0) {
                    $nodes = array_merge($nodes, $this->_getAncectors($value[$this->_parentSign]));
                }
            }
        }
        return $nodes;
    }
661449
public function getPath( $id )
	{
		$result = array();
		$node = $this->getNode( $id, MW_Tree_Manager_Abstract::LEVEL_ONE );

		$search = $this->createSearch();

		$expr = array(
			$search->compare( '<=', $this->_searchConfig['left']['code'], $node->left ),
			$search->compare( '>=', $this->_searchConfig['right']['code'], $node->right ),
		);

		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSortations( array( $search->sort( '+', $this->_searchConfig['left']['code'] ) ) );

		$results = $this->searchNodes( $search );

		foreach ( $results as $item ) {
			$result[$item->getId()] = $item;
		}

		return $result;
	}
338462
public function findById($id)
    {
        $queryBuilder = $this->createQueryBuilder('a')
            ->addSelect('domains')
            ->leftJoin('a.domains', 'domains')
            ->where('a.id = :id');

        $query = $queryBuilder->getQuery();
        $query->setParameter('id', $id);

        return $query->getSingleResult();
    }
678818
public function exportById($id): array
    {
        $site = Craft::$app->sites->getSiteById((int) $id);

        return $this->export($site);
    }
861248
public function getSinglePublicKey(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/user/keys/:id', (string)$id));
    }
697328
protected function resolveUser($id)
	{
		if (!is_numeric($id))
		{
			if (strstr($id, '@'))
			{
				$user = User::oneByEmail($id);
			}
			else
			{
				$user = User::oneByUsername($id);
			}
		}
		else
		{
			$user = User::oneOrNew($id);
		}

		return $user;
	}
104077
public function resolveEmails(int $mode)
    {
        $emails = [];

        /** @var GmailUserInterface $gmailUser */
        foreach ($this->getGmailDomain()->getGmailUsers() as $gmailUser) {
            $gmailUserEmails = $this->resolveEmailsFromUserId($gmailUser->getUserId(), $mode);
            foreach ($gmailUserEmails as $email) {
                $emails[] = $email;
            }
        }

        return $emails;
    }
328579
public function get(string $id = null): array
    {
        if ($this->has($id)) {
            return $this->cache[$id];
        }

        return [];
    }
790244
public function forkGist(string $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/gists/:id/forks', $id), Request::METHOD_POST);
    }
1146772
public function viewThread(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/notifications/threads/:id', (string)$id));
    }
900827
public function get(string $id): ?array
  {
    $mask = $this->db->rselect('bbn_notes_masks', [], ['id_note' => $id]);
    if ( $data = $this->notes->get($mask['id_note']) ){
      $data['default'] = $mask['def'];
      $data['id_type'] = $mask['id_type'];
      $data['type'] = $this->o->text($mask['id_type']);
      $data['name'] = $mask['name'];
      return $data;
    }
    return null;
  }
938024
public function getUser($id = null) : ?Authenticatable
    {
        if ($id === null) {
            return $this->getModel();
        }

        if (is_int($id)) {
            return $this->getById($id);
        }

        if (filter_var($id, FILTER_VALIDATE_EMAIL) !== false) {
            return $this->getByEmail($id);
        }

        return $this->getModel();
    }
62644
public function getRangeByID($id)
    {
        $result = null;
        if ($id) {
            $rs = $this->connection->executeQuery(
                'SELECT * FROM LoginControlIpRanges WHERE lcirID = ? LIMIT 1',
                [$id]
            );
            $row = $rs->fetch();
            $rs->closeCursor();
            if ($row !== false) {
                $result = IPRange::createFromRow($row, $this->connection->getDatabasePlatform()->getDateTimeFormatString());
            }
        }

        return $result;
    }
1218973
public function getTeam(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/teams/:id', (string)$id));
    }