Updates session details obtained frm the services.

@return True if session was updated. If false the update is for a different user or session is not started.
509829
public boolean updateSessionDetails(final SessionData session) {

        synchronized (sharedLock) {
            if (session != null) {
                SharedPreferences.Editor editor = getSharedPreferences().edit();
                editor.putString(KEY_PROFILE_ID, session.getProfileId());
                editor.putString(KEY_SESSION_ID, session.getSessionId());
                editor.putString(KEY_ACCESS_TOKEN, session.getAccessToken());
                editor.putLong(KEY_EXPIRES_ON, session.getExpiresOn());
                boolean isUpdated = editor.commit();
                sharedLock.notifyAll();
                return isUpdated;
            }
            sharedLock.notifyAll();
        }

        return false;
    }
1220194
protected boolean refreshFromSystem() {
        Lock lock = this.namespacesLock.writeLock();
        try {
            lock.lock();
            // Re-read and re-register all of the namespaces ...
            SessionCache systemCache = repository.createSystemSession(context, false);
            SystemContent system = new SystemContent(systemCache);
            Collection<Namespace> namespaces = system.readAllNamespaces();
            if (namespaces.isEmpty()) return false;
            this.cache.clear();
            this.cache.register(namespaces);
        } catch (Throwable e) {
            logger.error(e, JcrI18n.errorRefreshingNodeTypes, repository.name());
        } finally {
            lock.unlock();
        }
        return true;
    }
234279
@Override
  public boolean isModified()
  {
    long now = CurrentTime.currentTime();
    long lastCheckTime = _lastCheckTime.get();
    
    if (now <= lastCheckTime + _checkInterval) {
      return _isModified;
    }

    if (! _lastCheckTime.compareAndSet(lastCheckTime, now)) {
      return _isModified;
    }

    if (isModifiedImpl()) {
      _isModified = true;
      //_lastCheckTime.set(0);
    }
    else {
      _isModified = false;
    }

    return _isModified;
  }
355025
def update
      if @user.update_attributes(permitted_params.user.merge({:password_required => true}))
        redirect_to new_session_url, :notice => t(:signed_up_successfully)
      else
        render :action => 'edit'
      end
    end
97645
def update(self):
        
        error = ""

        if self.key is None:
            error = "To update a client you need to provide a key"
        if self.secret is None:
            error = "To update a client you need to provide the secret"

        if error:
            raise ClientException(error)

        self.request()
        return True
14550
public synchronized boolean setToSuspended()
    {
        if ( state.get() != State.STARTED )
        {
            return false;
        }

        if ( (currentConnectionState == ConnectionState.LOST) || (currentConnectionState == ConnectionState.SUSPENDED) )
        {
            return false;
        }

        currentConnectionState = ConnectionState.SUSPENDED;
        postState(ConnectionState.SUSPENDED);

        return true;
    }
150711
public function updateLastAction ()
	{
		
		$arr	= $this->getSessionData ();
		
		$this->lastAction		= time ();
		$arr['last_action']		= $this->lastAction;
		
		$this->session ()->set (get_called_class (), serialize ($arr));
		
	}
643813
private boolean hasActiveSessions() {
        final SSLContext sslContext = getSSLContext(sslContextServiceController);
        if (sslContext == null) return false;
        SSLSessionContext sslSessionContext = server ? sslContext.getServerSessionContext() : sslContext.getClientSessionContext();
        return sslSessionContext.getIds().hasMoreElements();
    }
1042514
private boolean needsNewSession() {
        if (sessionCredentials == null) return true;

        long timeRemaining = sessionCredentialsExpiration.getTime() - System.currentTimeMillis();
        return timeRemaining < (this.refreshThreshold * 1000);
    }
525596
public boolean hasUpdates() {
        String hasUpdates = m_resultFields.get(HAS_UPDATES);
        return hasUpdates != null && Boolean.parseBoolean(hasUpdates);
    }
557775
public static function hasSessionMoved() {
		if(!isset($_SESSION['dachi_agent']))
			return true;

		$agents = $_SESSION['dachi_agent'];
		$agentc = $_SERVER['HTTP_USER_AGENT'];

		if($agents != $agentc) {
			if(strpos($agentc, "Trident") !== false && strpos($agents, "Trident") !== false)
				return false;

			return true;
		}

		return false;
	}
591401
public function actionSessionUpdate()
    {
        $identity = Yii::$app->adminuser->identity;
        $user = clone Yii::$app->adminuser->identity;
        $user->attributes = Yii::$app->request->bodyParams;
        $verify = ['title', 'firstname', 'lastname', 'id'];
        
        // check if email has changed, if yes send secure token and temp store new value in user settings table.
        if ($user->validate(['email']) && $user->email !== $identity->email && $this->module->emailVerification) {
            $token = $user->getAndStoreEmailVerificationToken();
            
            $mail = Yii::$app->mail->compose(Module::t('account_changeemail_subject'), Module::t('account_changeemail_body', ['url' => Url::base(true), 'token' => $token]))
            ->address($identity->email, $identity->firstname . ' '. $identity->lastname)
            ->send();
            
            if ($mail) {
                $identity->setting->set(User::USER_SETTING_NEWUSEREMAIL, $user->email);
            } else {
                $user->addError('email', Module::t('account_changeemail_tokensenterror', ['email' => $identity->email]));
                $identity->resetEmailVerification();
            }
        }
        
        if (!$this->module->emailVerification) {
            $verify[] = 'email';
        }
        
        if (!$user->hasErrors() && $user->update(true, $verify) !== false) {
            return $user;
        }
        
        return $this->sendModelError($user);
    }
175830
public function update()
    {
        if ($this->dirty === []) {
            return true;
        }

        $this->defaultTable();
        $this->sql['SET'] = $this->dirty;
        $this->eq($this->primary, $this->__get($this->primary));

        if (DB::update($this->sql)) {
            return $this->dirty()->reset();
        }

        return false;
    }
1297188
public boolean update(){
		boolean b = getForecast(String.valueOf(getLatitude()), String.valueOf(getLongitude()));
		return b;
	}
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
1054871
public function updateTimestamp($session_id, $session_data): bool
    {
        $this->getFacade()->expire($this->prefix . $session_id, $this->ttl);

        return true;
    }
318314
public function alreadyUpdated()
    {
        $migrations = $this->getMigrations();
        $dbMigrations = $this->getExecutedMigrations();

        // If the count of migrations and dbMigrations is equal,
        // then the update as already been updated.
        if (count($migrations) == count($dbMigrations)) {
            return true;
        }

        // Continue, the app needs an update
        return false;
    }