Returns the current user login.

@return string
195726
public function getUserLogin()
    {
        // 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.'MoufUserLogin'])) {
            return $_SESSION[$this->sessionPrefix.'MoufUserLogin'];
        } else {
            foreach ($this->authProviders as $provider) {
                /* @var $provider AuthenticationProviderInterface */
                $login = $provider->getUserLogin($this);
                if ($login) {
                    return $login;
                }
            }
        }
        return null;
    }
1219899
public function getCurrentUser()
    {
        $returnValue = null;

    	if(!common_session_SessionManager::isAnonymous()){
        	$userUri = \common_session_SessionManager::getSession()->getUser()->getIdentifier();
			if(!empty($userUri)){
        		$returnValue = new core_kernel_classes_Resource($userUri);
			} else {
				common_Logger::d('no userUri');
			}
    	}

        return $returnValue;
    }
1063369
protected function getLoggedUser()
    {
        $user = $this->get('security.token_storage')->getToken()->getUser();
        if (is_string($user)) {
            $user = null;
        }

        return $user;
    }
150673
public function getLoginResult()
    {
        if (null === $this->loginResult) {
            $this->login($this->username, $this->password, $this->token);
        }

        return $this->loginResult;
    }
980640
protected function GetCurrentUser()
	{
		if (!$this->_cu)
		{
			require_once("verysimple/Authentication/Authenticator.php");
			
			$this->Phreezer->Observe("Loading CurrentUser from Session");
			$this->_cu = Authenticator::GetCurrentUser($this->GUID);

			if ($this->_cu )
			{
				if (get_class($this->_cu) == "__PHP_Incomplete_Class")
				{
					// this happens if the class used for authentication was not included before the session was started
					$tmp = print_r($this->_cu,1);
					$parts1 = explode("__PHP_Incomplete_Class_Name] => ",$tmp);
					$parts2 = explode("[",$parts1[1]);
					$name = trim($parts2[0]);

					Authenticator::ClearAuthentication($this->GUID);
					throw new Exception("The class definition used for authentication '$name' must be defined (included) before the session is started, for example in _app_config.php.");
				}
				else
				{
					// refresh the current user if the object supports it
					if (method_exists($this->_cu, 'Refresh')) $this->_cu->Refresh($this->Phreezer);
				}
			}
		}
		else
		{
			$this->Phreezer->Observe("Using previously loaded CurrentUser");
		}

		return $this->_cu;
	}
730332
public function getLoggedUser()
    {
        // Mini cache mechanism to avoid serving a new object each time the function is called.
        if ($this->loggedUser) {
            if ($this->getUserId() == $this->loggedUser->getId()) {
                return $this->loggedUser;
            }
        }
        $this->loggedUser = new UserWrapper(wp_get_current_user());

        return $this->loggedUser;
    }
205052
protected function getCurrentUser() {
    $use_ecomm_sessions = \Drupal::config('acm.commerce_users')
      ->get('use_ecomm_sessions');

    if ($use_ecomm_sessions) {
      return \Drupal::service('acm.commerce_user_manager');
    }
    else {
      return \Drupal::currentUser();
    }
  }
989471
public static function getCurrent()
    {
        if (empty(self::$current)) {
            Logger::get()->debug('Checking session for users...');
            self::$current = static::getInstance()->getFromSession();

            // Nothing there, new visitor then.
            if (empty(self::$current)) {
                throw new \RuntimeException('Unable to obtain a user');
            }

            // Update last seen time.
            self::$current->lastSeen = new \DateTime;

            Logger::get()->debug(
                'Current user is ' . self::$current->getId()
            );
        }

        return self::$current;
    }
172291
public function getUser()
    {
        if ($this->_user) return $this->_user;
        
	    try {
    	    $za = $this->getAuth();
            $id = $za->getIdentity();
            if (!$id) return FALSE;
        } catch (\Exception $e) {
            return FALSE;
        }
                
        if (isset($id['user_id'])) {
        
           if (!$this->_connected) return false;          
           $this->_user = User::getAuthorized($id);
           
        }
        
        return $this->_user;
    }
444428
private function getCurrentUserId()
    {
        if ($this->authorizationChecker->isGranted('IS_AUTHENTICATED_FULLY') // user has just logged in
            || $this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED') // user has logged in using remember_me cookie
        ) {
            $authenticationToken = $this->tokenStorage->getToken();
            $user = $authenticationToken->getUser();

            if (is_string($user)) {
                return $user;
            } elseif (method_exists($user, 'getAPIUser')) {
                return $user->getAPIUser()->id;
            }

            return $authenticationToken->getUsername();
        }

        if (!$this->session->isStarted()) {
            $this->session->start();
        }

        $request = $this->requestStack->getMasterRequest();

        if (!$request->cookies->has('yc-session-id')) {
            $request->cookies->set('yc-session-id', $this->session->getId());
        }

        return $request->cookies->get('yc-session-id');
    }
666766
public function authenticatedUser()
	{
		if ($this->IsAuthenticated())
		{
			$user = UserContext::getInstance()->userInfo();
            return $user[$this->getUsersDatabase()->getUserTable()->username];
		}
		else
		{
			return "";
		}
	}
977843
public function login()
    {
        if ($this->validate()) {
            return Podium::getInstance()->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
        }
        return false;
    }
1288881
public function getLogin()
    {

        if (null !== Auth::user()) {
            return redirect()->intended($this->redirectPath());
        }

        $page_title = "Login";

        return view('backend::auth.login', compact('page_title'));
    }
393004
public function actionLogin()
    {
        if (!Yii::$app->user->isGuest) {
            Yii::$app->session->setFlash('danger', Yii::t('user', 'You are already logged in.'));
            return $this->goHome();
        }
        if (Yii::$app->request->isGet) {
            Yii::$app->user->setReturnUrl(Yii::$app->request->getReferrer());
        }

        /**
         * @var LoginForm $model
         */
        $model = new LoginForm();
        if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }
        if ($model->load(Yii::$app->getRequest()->post()) && $model->login()) {
            return $this->goBack(Yii::$app->getHomeUrl());
        }
        if (Yii::$app->request->isAjax) {
            return $this->renderAjax('login_modal', [
                'model' => $model,
                'module' => $this->module,
            ]);
        }
        return $this->render('login', ['model' => $model, 'module' => $this->module]);
    }
914623
public function actionLogin()
    {
        if (! Yii::$app->getUser()->getIsGuest()) {
            return $this->goHome();
        }

        $model = new LoginForm();
        if ($model->load(Yii::$app->getRequest()->post()) && $model->login()) {
            return $this->goBack();
        } else {
            return $this->renderPartial('login', [
                'model' => $model,
            ]);
        }
    }
188369
protected function getUser()
    {
        if ($this->_user === null) {
            $this->_user = Admin::findByEmailOrMobileOrUsername($this->login);
        }
        return $this->_user;
    }
847027
public function getUser()
    {
        if ($this->_user === false) {
            $this->_user = User::findByKeyfield($this->username);
        }
        return $this->_user;
    }