Get the User model for this  by Id.

@uses \Octo\System\Store\UserStore::getById()
@uses User
@return User|null
557126
public function getUser() : ?User
    {
        $key = $this->getUserId();

        if (empty($key)) {
           return null;
        }

        return User::Store()->getById($key);
    }
1072220
private function getActualUserFromDb()
    {
        $dao = $this->em->getRepository(CModel\User\User::class);
        return $dao->find($this->getUser()->id);
    }
1352414
public function findById($id)
	{
		$model = $this->createModel();

		$user = $model->where('id', '=', $id)->find();

		if ( ! $user->loaded() )
		{
			throw new UserNotFoundException("A user could not be found with ID [$id].");
		}

		return $user;
	}
1043022
protected function getUser()
    {
        if ($this->_user === null) {
            $user = \thienhungho\UserManagement\models\User::findByUsername($this->username);
            $this->_user = $user;
        }

        return $this->_user;
    }
119687
protected function getPayPalUser()
    {
        $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if (!$user->loadUserPayPalUser()) {
            $user = $this->getUser();
        }

        return $user;
    }
685684
public function getUser()
    {
        if ($this->_user === false) {
            $this->_user = User::findByUsernameOrEmail($this->identifier);
        }

        return $this->_user;
    }
492293
public function getUser()
    {
        if ($this->_user === false) {
            foreach (Yii::$app->user->getLoginPriority() as $item) {
                if ($item::validate($this->id)) {
                    return $item::getUser($this->id);
                }
            }
        }

        return $this->_user;
    }
800223
public function userId()
	{
		if (isset($this->user_id)) {
			return $this->user_id ? $this->user_id : null;
		}
		
		$this->check();
		$this->user_id = false;
		
		if ('user' == $this->type) {
			if ($user_id = Authorizer::getResourceOwnerId()) {
				return $this->user_id = $user_id;
			}
		}
		
		return null;
	}
1263654
public function getUserId()
    {
        // Is a session mechanism available?
        if (!session_id()) {
            if ($this->sessionManager) {
                $this->sessionManager->start();
            } else {
                throw new MoufException("The session must be initialized before checking if the user is logged. Please use session_start().");
            }
        }
        
        if (isset($_SESSION[$this->sessionPrefix.'MoufUserId'])) {
            return $_SESSION[$this->sessionPrefix.'MoufUserId'];
        } else {
            foreach ($this->authProviders as $provider) {
                /* @var $provider AuthenticationProviderInterface */
                $userId = $provider->getUserId($this);
                if ($userId) {
                    return $userId;
                }
            }
        }
        return null;
    }
623926
protected function getUserModel()
    {
        $config = $this->app->make('config');

        if (! is_null($model = $this->getUserModelFromDefaultGuard($config))) {
            return $model;
        }

        return $config->get('auth.model', \App\User::class);
    }
876063
public function getUser()
    {
        if ($this->user_id) {
            return $this->hasOne(Yii::$app->user->identityClass, ['id' => 'user_id']);
        }
        return null;
    }
590290
public function getForUser($user_id = null)
    {
        if ($user_id) {
            return $this->model->whereUserId($user_id)->get()->first()->toArray();
        }

        if(auth()->user()){
            return $this->model->whereUserId(auth()->user()->id)->first()->toArray();
        }


        return null;
    }
452548
public function getUser()
    {
        if ( ! $this->container->has('security')) {
            return false;
        }

        $security = $this->container->get('security');

        if ( ! $token = $security->getToken()) {
            return false;
        }

        $user = $token->getUser();
        if ( ! $user instanceof UserInterface) {
            return false;
        }

        return $user;
    }
665395
public static function user()
    {
        if (Session::has('user')) {
            $userModel = Config::get('user');
            $model = new $userModel();

            return $model->find(Session::get('user'));
        }
        return false;
    }
980775
public function getUser()
    {
        if (null !== $this->user) {
            return $this->user;
        }

        $this->parseUserInfo();

        return $this->user;
    }
812634
protected function getUserId() {
        $user = Auth::user();
        if (is_object($user) && !empty($user->id)) {
            return $user->id;
        } else {
            return null;
        }
    }
890180
public function user()
    {
        $relation = $this->belongsTo($this->getUserModelName());

        if (in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this->getUserModelName())))
        {
            $relation->withTrashed();
        }

        return $relation;
    }