Returns last login

@return string
431273
public function getLastLogin()
    {
        if ($this->sessionBag->has(self::PARAM_LAST_LOGIN_NS)) {
            return $this->sessionBag->get(self::PARAM_LAST_LOGIN_NS);
        } else {
            return null;
        }
    }
1012456
public function loginAction()
    {
        if ($this->getUser()) {
            return $this->redirectToRoute($this->get(Configuration::class)->getHomeRoute());
        }
        $authenticationUtils = $this->get('security.authentication_utils');

        // get the login error if there is one
        $error = $authenticationUtils->getLastAuthenticationError();

        // last username entered by the user
        $lastUsername = $authenticationUtils->getLastUsername();

        return [
            'last_username' => $lastUsername,
            'error' => $error,
        ];
    }
1094677
public function getLastLoggedIn()
    {
        $lastTime = LoginAttempt::get()
            ->filter([
                'MemberID' => $this->owner->ID,
                'Status' => 'Success',
            ])
            ->sort('Created', 'DESC')
            ->first();

        if ($lastTime) {
            return $lastTime->dbObject('Created')->format(DBDatetime::ISO_DATETIME);
        }
        return _t(__CLASS__ . '.NEVER', 'Never');
    }
787455
public function getLogoutDate()
    {
        return isset($this->loginData[self::LOGOUT_DATE]) ? $this->loginData[self::LOGOUT_DATE] : null;
    }
958171
def last_login_date(self):
        
        return sa.Column(
            sa.TIMESTAMP(timezone=False),
            default=lambda x: datetime.utcnow(),
            server_default=sa.func.now(),
        )
580673
public function actionLogin()
    {
        if (!Yii::$app->user->isGuest) {
            return $this->goHome();
        }

        $period = isset($this->module->params['loginAdminKeepPeriodSec'])
            ? intval($this->module->params['loginAdminKeepPeriodSec'])
            : null;

        $model = $this->module->model('LoginForm');
        $model->rememberMe = false;

        if ($model->load(Yii::$app->request->post()) && $model->login($period)) {
            return $this->goBack();
        } else {
            return $this->render('login', [
                'model' => $model,
            ]);
        }
    }
118751
public function last_id()
  {
    if ( $this->last_insert_id ){
      return str::is_buid($this->last_insert_id) ? bin2hex($this->last_insert_id) : $this->last_insert_id;
    }
    return false;
  }
807778
public function getLast()
    {
        $last = null;

        if (count($this->objects) > 0) {
            $last = end($this->objects);
        }

        return $last;
    }
36491
public function getLast()
    {
        if (0 === $this->count()) {
            return null;
        }

        end($this->data);

        return current($this->data);
    }
1205975
public function getLogin()
    {
        if ($this->guard()->check()) {
            return redirect($this->redirectPath());
        }

        return view($this->loginView);
    }
104894
public function last()
    {
        $lastIndex = $this->count() - 1;
        if ($this->offsetExists($lastIndex)) {
            return $this->offsetGet($lastIndex);
        }
    }
1296599
public function getLastCategoryId()
    {
        $value = $this->getData();

        if ($this->flashed === true) {
            // Clear data
            $this->clearData();
        }

        return $value;
    }
367033
public function last()
    {
        $last = null;
        foreach ($this->each() as $v) {
            $last = $v;
        }
        return $last;
    }
977843
public function login()
    {
        if ($this->validate()) {
            return Podium::getInstance()->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
        }
        return false;
    }
571918
public function getLastReturn()
    {
        if (!$this->entries) {
            throw new \LogicException('No entries');
        }

        $last = end($this->entries);

        if (isset($last['result'])) {
            return $last['result'];
        } elseif (isset($last['exception'])) {
            return $last['exception'];
        } else {
            throw new \LogicException('No return value for last entry.');
        }
    }
222091
public function last()
    {
        return (null === $this->getDraft()) ? $this->getData($this->count() - 1) : $this->getDraft()->last();
    }
683951
public static function lastActive()
    {
        $last = Podium::getInstance()->podiumCache->get('forum.lastactive');
        if ($last === false) {
            $time = time() - 15 * 60;
            $last = [
                'count' => static::find()->where(['>', 'updated_at', $time])->count(),
                'members' => static::find()->where(['and',
                        ['>', 'updated_at', $time],
                        ['is not', 'user_id', null],
                        ['anonymous' => 0]
                    ])->count(),
                'anonymous' => static::find()->where(['and',
                        ['>', 'updated_at', $time],
                        ['is not', 'user_id', null],
                        ['anonymous' => 1]
                    ])->count(),
                'guests' => static::find()->where(['and',
                        ['>', 'updated_at', $time],
                        ['user_id' => null]
                    ])->count(),
                'names' => [],
            ];
            $members = static::find()->where(['and',
                    ['>', 'updated_at', $time],
                    ['is not', 'user_id', null],
                    ['anonymous' => 0]
                ]);
            foreach ($members->each() as $member) {
                $last['names'][$member->user_id] = [
                    'name' => $member->username,
                    'role' => $member->user_role,
                    'slug' => $member->user_slug,
                ];
            }
            Podium::getInstance()->podiumCache->set('forum.lastactive', $last, 60);
        }
        return $last;
    }