Get all verified emails for the logged in user.
@return array
17148
public function getVerifiedEmails() {
        $emails = array();
        try {
            $user = $this->api('/me');
            if (isset($user['emails']) && is_array($user['emails']) && count($user['emails']) > 0) {
                foreach ($user['emails'] as $key => $value) {
                    if (isset($value['verified']) && $value['verified'] == true) {
                        $emails[] = $value['value'];
                    }
                }
            }
        } catch (VGS_Client_Exception $e) {
            self::errorLog('Exception thrown when getting logged in user:'. $e->getMessage());
        }

        return $emails;
    }
819966
public function confirm()
    {
        Yii::$app->get('hiart')->disableAuth();
        try {
            $confirmation = Contact::perform('confirm-email', [
                'confirm_data' => Yii::$app->request->get(),
            ]);

            return [
                'success' => true,
            ];
        } catch (\hiqdev\hiart\ResponseErrorException $e) {
            return [
                'success' => false,
                'message' => $e->getMessage(),
            ];
        }
    }
44539
private function getValidOwnerIds()
    {
        $userRepo = $this->repository->getEntityManager()->getRepository(Entity\Users::class);
        $query = $userRepo->createQueryBuilder()
            ->select('id')
            ->where('enabled = :enabled')
            ->setParameter('enabled', true)
        ;
        $userRecords = $query->execute()->fetchAll(\PDO::FETCH_COLUMN);

        return $userRecords;
    }
1074306
public function getUsersPairs()
    {
        // Check and init cache
        if (!self::$cached_users_pairs) {
            $user_collection = new AdminUserRepository;
            $user_collection->addOrderByField('name');
            foreach ($user_collection->getAsArrayOfObjects() as $v) {
                /** @var AdminUser $v */
                self::$cached_users_pairs[$v->getId()] = $v->getName() . ' ' . $v->getSurname() . ' [' . $v->getLogin() . ']';
            }
        }

        return self::$cached_users_pairs;
    }
279767
public function listVerifiedEmailAddresses() {
        $response = $this->_makeRequest(array(
            'Action' => 'ListVerifiedEmailAddresses'
        ));
        $dom = new DOMDocument();
        $dom->loadXML($response);
        $members = $dom->getElementsByTagName('member');
        $out = array();
        foreach ($members as $member) {
            $out[] = $member->nodeValue;
        }
        return $out;
    }
791175
public function verify()
    {
        $collection          = new RequestLogCollection();
        $requests            = $this->requestLogs($collection);
        $errorLogsCollection = app(LogViewer::class)->statsTable();
        $errorLogs           = $this->errorLogs($errorLogsCollection->rows());

        $activeLogsCollection = Logs::with('component', 'priority', 'user', 'brand')->whereHas('component', function($q) {
                    $q->where('active', 1);
                })->where('brand_id', brand_id())->get();

        $activeLogs = $this->activeLogs($activeLogsCollection);

        $return = ['requests' => $requests, 'errors' => $errorLogs, 'activity' => $activeLogs];
        $this->validate($return);
        return $return;
    }
1334860
public function rules()
    {
        $user = $this->users->findBy('id', \Auth::user()->id);

        return [
            'username' => 'required|max:255|unique:users,username,'.$user->id,
            'email' => 'required|email|max:255|unique:users,email,'.$user->id,
            'password' => 'sometimes|required|min:6|confirmed'
        ];
    }
1306688
public static function getList()
    {
        $time = time();
        $return = [];
        
        foreach (self::find()->with('user')->all() as $item) {
            /* @var $item \luya\admin\models\UserOnline */
            $inactiveSince = ($time - $item->last_timestamp);
            $return[] = [
                'firstname' => $item->user->firstname,
                'lastname' => $item->user->lastname,
                'email' => $item->user->email,
                'last_timestamp' => $item->last_timestamp,
                'is_active' => ($inactiveSince >= (3*60)) ? false : true,
                'inactive_since' => round(($inactiveSince / 60)).' min',
                'lock_description' => Module::t($item->lock_translation, empty($item->lock_translation_args) ? [] : Json::decode($item->lock_translation_args)),
            ];
        }

        return $return;
    }
7721
public function getAgeVerifications()
    {
        return isset($this->profileData[self::ATTR_AGE_VERIFICATIONS])
            ? $this->profileData[self::ATTR_AGE_VERIFICATIONS] : [];
    }
1073499
protected function getEmailData(User $user, $email)
    {
        $token = $this->generateToken($user, $email);

        return [
            '{username}' => $user->display_name,
            '{url}' => $this->url->to('forum')->route('confirmEmail', ['token' => $token->token]),
            '{forum}' => $this->settings->get('forum_title')
        ];
    }
477687
private function getAdminUserAttributes()
    {
        $attributes = [
            'username'     => 'admin',
            'first_name'   => 'Super',
            'last_name'    => 'ADMIN',
            'email'        => env('ADMIN_EMAIL',    'admin@example.com'),
            'password'     => env('ADMIN_PASSWORD', 'password'),
            'is_admin'     => true,
            'activated_at' => $now = now(),
        ];

        if (UserConfirmator::isEnabled())
            $attributes['confirmed_at'] = $now;

        return $attributes;
    }
736395
public static function find_trusted_emails($user_id)
	{
		if (empty($user_id) || !is_numeric($user_id))
		{
			return false;
		}

		$results = self::all()
			->whereEquals('user_id', $user_id)
			->rows()
			->fieldsByKey('email');

		if (empty($results))
		{
			return false;
		}

		return $results;
	}
258453
public function checkEmailAction()
    {
        $session = $this->getSession();
        $email = $session->get('silex_user_confirmation_email');

        if (empty($email)) {
            return $this->redirect('silex_user.register');
        }

        $session->remove('silex_user_confirmation_email');
        $user = $this->getUserManager()->findUserByEmail($email);

        if (null === $user) {
            throw new NotFoundHttpException(sprintf('The user with email "%s" does not exist', $email));
        }
        
        return $this->render('silex_user/registration/check_email.twig', [
            'user' => $user
        ]);
    }
579864
protected function getEveryOption()
    {
        return [
            'notmailed'     => $this->_('Not emailed'),
            'tomail'        => $this->_('To email'),
            'toremind'      => $this->_('Needs reminder'),
            'hasnomail'     => $this->_('Missing email'),
            'notmailable'   => $this->_('Not allowed to email'),
        ];
    }
1200877
public function getCc()
    {
        $recipients = [];
        foreach ($this->message->getCc() as $email => $name) {
            $recipients[] = new Email($email, $name);
        }

        return $recipients;
    }
153394
public function getData(): array
    {
        return [
            $this->serverOriginScheme,
            $this->serverOriginHost,
            $this->serverOriginPort,
            $this->isPreFlightCanBeCached,
            $this->preFlightCacheMaxAge,
            $this->isForceAddMethods,
            $this->isForceAddHeaders,
            $this->isUseCredentials,
            $this->areAllOriginsAllowed,
            $this->allowedOrigins,
            $this->areAllMethodsAllowed,
            $this->allowedLcMethods,
            $this->allowedMethodsList,
            $this->areAllHeadersAllowed,
            $this->allowedLcHeaders,
            $this->allowedHeadersList,
            $this->exposedHeadersList,
            $this->isCheckHost,
        ];
    }
875461
public function UserEnabledCheck()
    {
        $user = Auth::user()->where('email', '=', Auth::user()->email )->get()->first();

        if ( $user ) {
            return $user->enabled;
        } else {
            return false;
        }
    }