Pull a acct from the repository by its recaller ID.

@param  string $recaller
@return mixed
332032
protected function getAcctByRecaller( $recaller )
	{
		if ( $this->validRecaller( $recaller ) && !$this->tokenRetrievalAttempted )
		{
			$this->tokenRetrievalAttempted = true;
			list( $id, $token ) = explode( '|', $recaller, 2 );
			$this->viaRemember = !is_null( $acct = $this->auth->retrieveByToken( $id, $token ) );

			return $acct;
		}

		return null;
	}
318709
public function get(string $entryIdentifier)
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752);
        }
        $code = $this->backend->get($entryIdentifier);

        if ($code === false) {
            return false;
        }

        preg_match('/^(?:.*\n){1}((?:.*\n)*)(?:.+\n?|\n)$/', $code, $matches);

        return $matches[1];
    }
1298072
public function retrieveByToken( $identifier, $token )
	{
		$acct = $this->conn->table( $this->table )->where( 'id', $identifier )->where( 'remember_token', $token )->first();

		return $this->getGenericAccount( $acct );
	}
1111675
public function pull($key, $default = null)
    {
        if (isset($this->cache[$key])) {
            $cached = $this->cache[$key];
            unset($this->cache[$key]);

            return $cached;
        }

        return $default;
    }
1013090
public static function fromRecord($record)
    {
        if (!$record) {
            return null;
        }
        $className = get_called_class();
        $entity = new $className;
        foreach ($record as $key => $value) {
            $entity->$key = $value;
        }
        return $entity;
    }
91073
protected function finderWrapperInject($finder)
    {
        foreach ($this->wrappedMethodHistory as $row) {
            call_user_func_array(array($finder, $row['method']), $row['args']);
        }
    }
1003978
final protected function resolvePersister($persister)
    {
        if (null === $persister) {
            return $this->persister;
        }

        switch (true) {
            case $persister instanceof PersisterInterface:
                return $persister;
            case $persister instanceof ObjectManager:
                return new Doctrine($persister);

            default:
                throw new \InvalidArgumentException(sprintf(
                    'Invalid persister type, expected Nelmio\Alice\PersisterInterface or Doctrine\Common\Persistence\ObjectManager. Got %s instead.',
                    get_class($persister)
                ));
        }
    }
1068818
protected function getCredentialsFor( $roleIdentifier )
    {
        $roleService = $this->getRepository()->getRoleService();

        // First try to load role, throws exception if not found.
        $role = $this->getRepository()->sudo(
            function() use ( $roleService, $roleIdentifier )
            {
                // make sure role name starts with uppercase as this is what default setup provides
                if ($roleIdentifier !== ucfirst($roleIdentifier)) {
                    @trigger_error(
                        "'{$roleIdentifier}' role name should start with uppercase letter",
                        E_USER_DEPRECATED
                    );
                }

                return $roleService->loadRoleByIdentifier(ucfirst($roleIdentifier));
            }
        );

        // create a new user, uses 'User' trait
        $username = $this->findNonExistingUserName();
        $password = $this->getUserManager()->getDefaultPassword();
        $email = "${username}@ez.no";
        $user = $this->getUserManager()->ensureUserExists( $username, $email, $password );

        // Assign role to created user (without limitation)
        $this->getRepository()->sudo(
            function() use ( $roleService, $role, $user )
            {
                return $roleService->assignRoleToUser(
                    $role,
                    $user
                );
            }
        );

        return array(
            'login'     => $username,
            'password'  => $password,
        );
    }
776166
public function acct()
	{
		// If we've already retrieved the acct for the current request we can just
		// return it back immediately. We do not want to fetch the acct data on
		// every call to this method because that would be tremendously slow.
		if ( !is_null( $this->acct ) )
			return $this->acct;

		$acct = null;

		$token = $this->getTokenForRequest();

		if ( !empty( $token ) )
			$acct = $this->auth->retrieveByCredentials( [$this->storageKey => $token] );

		return $this->acct = $acct;
	}
1228025
public function reverseTransform($value)
    {
        if (null === $value) {
            return null;
        }

        $repo = $this->em->getRepository($this->className);
        $entity = $repo->find($value);

        if (!$entity) {
            return null;
        }

        return $entity;
    }
1071594
public function retrieveCustomer(StripeLocalCustomer $localCustomer)
    {
        // If no ID is set, return false
        if (null === $localCustomer->getId()) {
            return false;
        }

        $arguments = [
            'id'      => $localCustomer->getId(),
            'options' => [],
        ];

        // Return the stripe object that can be "false" or "Customer"
        return $this->callStripeApi(Customer::class, 'retrieve', $arguments);
    }
772144
public static function getFromIdentityProvider(Provider $identityProvider)
    {
        // Have the identity provider authenticate the current identity.
        $identityProvider->authenticate();
        // The identity is valid according to the provider, so authentication is
        // passed.
        $userId = $identityProvider->getUserId();
        // Check for authorisation.
        try {
            Logger::get()->debug(sprintf(
                'Checking OpenID user %s...',
                $userId
            ));
            $user = Users::getInstance()->findEntity($userId);
            // The user is valid according to our records. Keep it in the session.
            $user->authenticate($identityProvider);
        } catch (NotFoundException $exception) {
            Logger::get()->warning(sprintf(
                'OpenID user %s is not known.',
                $userId
            ));
            throw new NotAuthorisedException(
                'OpenID user is not authorised.'
            );
        }

        return $user;
    }
764878
public function capture($oOrder = null, $aRequestParameters = array())
    {
        $oData = $this->_callOrderRequest(
            'capture',
            $oOrder,
            $aRequestParameters,
            array(
                'amazon_authorization_id',
                'capture_amount',
                'currency_code',
                'capture_reference_id',
                'seller_capture_note'
            ),
            $blProcessable
        );

        //Update Order info
        if ($blProcessable === true && isset($oData->CaptureResult->CaptureDetails)) {
            $this->setCaptureState($oOrder, $oData->CaptureResult->CaptureDetails);
            $this->closeOrderReference($oOrder, array(), false);
        }

        return $oData;
    }
584831
function getNextService($discover_cb, $fetcher)
    {
        $manager = $this->getManager();
        if (!$manager || (!$manager->services)) {
            $this->destroyManager();

            list($yadis_url, $services) = call_user_func_array($discover_cb,
                                                               array(
                                                                $this->url,
                                                                $fetcher,
                                                               ));

            $manager = $this->createManager($services, $yadis_url);
        }

        if ($manager) {
            $loader = new Auth_Yadis_ManagerLoader();
            $service = $manager->nextService();
            $this->session->set($this->session_key,
                                serialize($loader->toSession($manager)));
        } else {
            $service = null;
        }

        return $service;
    }
183212
public function getRole($uri)
    {
        $returnValue = null;

        if(!empty($uri)){
        	$returnValue = new core_kernel_classes_Resource($uri);
        }

        return $returnValue;
    }
12654
protected function getLocalCustomer($stripeCustomerId)
    {
        // First try to get the customer from the database
        $localCustomer = $this->getEntityManager()->getRepository('SHQStripeBundle:StripeLocalCustomer')->findOneByStripeId($stripeCustomerId);

        // If we found it, return it
        if (null !== $localCustomer) {
            return $localCustomer;
        }

        // Try to find the customer in the newly created one that are not already persisted
        return $this->getEntityManager()->getUnitOfWork()->tryGetById($stripeCustomerId, StripeLocalCustomer::class);
    }
627937
public function recall($respObject)
    {
        if ($this->recallTimes < $this->recallMaxTimes)
        {
            $this->recallTimes++;
            $token = $this->refreshToken($this->config);
            if (isset($token['token']) && $token['token'])
            {
                $this->token              = $token['token'];
                $this->autoFreshTokenResp = $token['response'];
                $this->freshedToken       = true;

                return $this->execute($this->requestService);
            }
        }

        return $respObject;
    }