Changes the activity of start_at_login in dconf
167156
def on_start_at_login_toggled(self, chk):
        
        self.settings.general.set_boolean('start-at-login', chk.get_active())
        refresh_user_start(self.settings)
9795
public function onSessionStartEvent()
    {
        return function ($sessionStartEvent) {
            /** @var \PHPDaemon\Core\DeferredEvent $sessionStartEvent */
            $name = ini_get('session.name');
            $sid = $this->getCookieStr($name);
            if ($sid === '') {
                $this->sessionStartNew(function ($success) use ($sessionStartEvent) {
                    $sessionStartEvent->setResult($success);
                });
                return;
            }
            $this->onSessionRead(function ($session) use ($sessionStartEvent) {
                if ($this->getSessionState() === null) {
                    $this->sessionStartNew(function ($success) use ($sessionStartEvent) {
                        $sessionStartEvent->setResult($success);
                    });
                    return;
                }
                $sessionStartEvent->setResult(true);
            });
        };
    }
124584
def update_time_login(u_name):
        '''
        
        '''
        entry = TabMember.update(
            time_login=tools.timestamp()
        ).where(
            TabMember.user_name == u_name
        )
        entry.execute()
1343072
@Override
    protected void doStart() {
        try {
            String build = _configuration.getValue(SystemConfiguration.Property.BUILD);
            String version = _configuration.getValue(SystemConfiguration.Property.VERSION);
            String year = new SimpleDateFormat("yyyy").format(new Date());

            _log.info("Argus version {} build {}.", version, build);
            _log.info("Copyright Salesforce.com, {}.", year);
            _log.info("{} started.", getName());
            _persistService.start();
            _serviceFactory.getUserService().findAdminUser();
            _serviceFactory.getUserService().findDefaultUser();
        } catch (Throwable ex) {
            _log.error(getName() + " startup aborted.", ex);
        } finally {
            _mergeServiceConfiguration();
            _mergeNotifierConfiguration();
            _log.info(_configuration.toString());
        }
    }
580020
def switch_on(context, ain):
    """"""
    context.obj.login()
    actor = context.obj.get_actor_by_ain(ain)
    if actor:
        click.echo("Switching {} on".format(actor.name))
        actor.switch_on()
    else:
        click.echo("Actor not found: {}".format(ain))
845238
@SuppressLint("InlinedApi")
    public static void restartWithTheme(Activity activity, int theme, boolean force) {
        if (theme < _START_RESOURCES_ID && theme > 0) {
            if (ThemeManager._THEME_MODIFIER > 0) {
                theme |= ThemeManager._THEME_MODIFIER;
            }
            theme &= ThemeManager._THEME_MASK;
        }
        if (force || ThemeManager.getTheme(activity) != theme) {
            Intent intent = new Intent(activity.getIntent());
            intent.setClass(activity, activity.getClass());
            intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            if (theme > 0) {
                intent.putExtra(ThemeManager._THEME_TAG, theme);
            }
            intent.putExtra(KEY_INSTANCE_STATE, activity.saveInstanceState());
            intent.putExtra(KEY_CREATED_BY_THEME_MANAGER, true);
            if (activity.isRestricted()) {
                Application app = Application.getLastInstance();
                if (app != null && !app.isRestricted()) {
                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    app.superStartActivity(intent, -1, null);
                }
            } else {
                if (!activity.isFinishing()) {
                    activity.finish();
                    activity.overridePendingTransition(0, 0);
                }
                if (activity != null) {
                    activity.superStartActivity(intent, -1, null);
                }
            }
        }
    }
365111
def _enable_session_activity(self, app):
        """"""
        user_logged_in.connect(login_listener, app)
        user_logged_out.connect(logout_listener, app)
        from .views.settings import blueprint
        from .views.security import security, revoke_session
        blueprint.route('/security/', methods=['GET'])(security)
        blueprint.route('/sessions/revoke/', methods=['POST'])(revoke_session)
1365378
def setAsApplication(myappid):
    

    if os.name == 'nt':
        import ctypes
        ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
646133
def requires_login(func, *args, **kwargs):
    
    self = args[0]
    if self.session_token:
        return func(*args, **kwargs)
    raise exceptions.NotLoggedIn()
117484
def _activity_helper(modifier: str, location=None):
    
    rv = {MODIFIER: modifier}

    if location:
        rv[LOCATION] = location

    return rv
843624
public void startAuthActivity(Context context, Bundle extras) {
        if (!startDelegateActivity(context, delegate.getAuthStartIntent(), extras)) {
            startActivity(context, extras, AuthActivity.class);
        }
    }
545419
def onStart(self, *args, **kwarg):
        
        with transactUI(self):
            config = self.navbar.getActiveConfig()
            config.resetErrors()
            if config.isValid():
                self.clientRunner.run(self.buildCliString())
                self.showConsole()
            else:
                config.displayErrors()
                self.Layout()
199878
def on_start(self, session, session_context):
        
        session_id = session.session_id
        web_registry = session_context['web_registry']

        if self.is_session_id_cookie_enabled:
            web_registry.session_id = session_id
            logger.debug("Set SessionID cookie using id: " + str(session_id))

        else:
            msg = ("Session ID cookie is disabled.  No cookie has been set for "
                   "new session with id: " + str(session_id))
            logger.debug(msg)
718338
function maybeStart(priv) {
  if (priv.started) {
    return;
  }
  priv.elem.addEventListener(feature.transitionEventName, handleTransitionEnd.bind(null, priv));
  priv.started = true;
}
424453
public void onInit() {

        String authToken = m_params.getAuthToken();
        if (authToken != null) {
            m_ui.showForgotPasswordView(authToken);
        } else if (m_params.isReset()) {
            m_ui.showPasswordResetDialog();
        } else {
            boolean loggedIn = !A_CmsUI.getCmsObject().getRequestContext().getCurrentUser().isGuestUser();
            m_ui.setSelectableOrgUnits(CmsLoginHelper.getOrgUnitsForLoginDialog(A_CmsUI.getCmsObject(), null));
            if (loggedIn) {
                if (m_params.isLogout()) {
                    logout();
                } else {
                    m_ui.showAlreadyLoggedIn();
                }
            } else {
                m_ui.showLoginView(m_params.getOufqn());
            }
        }

    }
1347884
def ServerLoggingStartupInit():
  """"""
  global LOGGER
  if local_log:
    logging.debug("Using local LogInit from %s", local_log)
    local_log.LogInit()
    logging.debug("Using local AppLogInit from %s", local_log)
    LOGGER = local_log.AppLogInit()
  else:
    LogInit()
    LOGGER = AppLogInit()
768441
def get_current_activities(self, login=None, **kwargs):
        

        _login = kwargs.get(
            'login',
            login or self._login
        )
        _activity_url = ACTIVITY_URL.format(login=_login)
        return self._request_api(url=_activity_url).json()