handleUserMe *******************************************************
346362
function handleSocketToken(req, res, next) {
		const transomNonce = server.registry.get(nonceHandler);

		function loggable(token) {
			if (typeof transomNonce.loggableToken === 'function') {
				return transomNonce.loggableToken(token);
			}
			return `${token.substr(0, 4)}***${token.substr(-4)}`;
		}

		var p = new Promise(function (resolve, reject) {
			// Create the nonce with req.locals.user as the payload.
			transomNonce.createNonce(req.locals.user, nonceExpirySeconds, function (err, nonce) {
				if (err) {
					debug('Error creating nonce', err);
					return reject(err);
				}
				debug(`Created nonce ${loggable(nonce.token)}`);
				resolve(nonce);
			});
		}).then(function (nonce) {
			debug(`Replying with ${loggable(nonce.token)}`);
			res.json({
				token: nonce.token
			});
			next();
		}).catch(function (err) {
			debug('Error in handleSocketToken', err);
			next(err);
		});
	}
218231
void submit() {

        try {
            // Special user info attributes may have been set since the time the dialog was instantiated,
            // and we don't want to overwrite them, so we read the user again.
            m_user = m_context.getCms().readUser(m_user.getId());
            m_form.submit(m_user, m_context.getCms(), new Runnable() {

                public void run() {

                    try {
                        m_context.getCms().writeUser(m_user);
                        m_context.finish(Collections.<CmsUUID> emptyList());
                        m_context.updateUserInfo();
                    } catch (CmsException e) {
                        //
                    }
                }
            });
        } catch (CmsException e) {
            LOG.error("Unable to read user", e);
        }
    }
807571
def handle(self, *args, **options):
        
        now = arrow.utcnow().to(settings.TIME_ZONE)
        now = now.date()

        digest = Digest.objects.filter(date_end=str(now)).order_by('user', 'date_end')
        users = digest.distinct('user')

        subject = 'Your digester'

        msg_plain = render_to_string('digest/email.txt', {'digest': digest, 'subject': subject})
        msg_html = render_to_string('digest/email.html', {'digest': digest, 'subject': subject})
        message = msg_plain
        from_email = settings.ADMINS
        recipient_list = ()
        for user in users:
            recipient_list += (user.user.email,)

        send_mail(subject, message, from_email, recipient_list,
                  html_message=msg_html)
482173
public function handleUserEntry()
    {
        $sessionClass = ReporticoSession();

        // First look for a parameter beginning "submit_". This will identify
        // What the user wanted to do.

        $hide_area = false;
        $show_area = false;
        $maintain_sql = false;
        $xmlsavefile = false;
        $xmldeletefile = false;
        if (($k = $this->getMatchingPostItem("/^submit_/"))) {
            // Strip off "_submit"
            preg_match("/^submit_(.*)/", $k, $match);

            // Now we should be left with a field element and an action
            // Lets strip the two
            $match1 = preg_split('/_/', $match[0]);
            $fld = $match1[1];
            $action = $match1[2];

            switch ($action) {
                case "ADD":
                    // We have chosen to set a block of data so pass through Request set and see which
                    // fields belong to this set and take appropriate action
                    $this->addMaintainFields($fld);
                    $show_area = $fld;
                    break;

                case "DELETE":
                    // We have chosen to set a block of data so pass through Request set and see which
                    // fields belong to this set and take appropriate action
                    $this->deleteMaintainFields($fld);
                    $show_area = $fld;
                    break;

                case "MOVEUP":
                    // We have chosen to set a block of data so pass through Request set and see which
                    // fields belong to this set and take appropriate action
                    $this->moveupMaintainFields($fld);
                    $show_area = $fld;
                    break;

                case "MOVEDOWN":
                    // We have chosen to set a block of data so pass through Request set and see which
                    // fields belong to this set and take appropriate action
                    $this->movedownMaintainFields($fld);
                    $show_area = $fld;
                    break;

                case "SET":
                    // We have chosen to set a block of data so pass through Request set and see which
                    // fields belong to this set and take appropriate action
                    $this->updateMaintainFields($fld);
                    $show_area = $fld;
                    break;

                case "REPORTLINK":
                case "REPORTLINKITEM":
                    // Link in an item from another report
                    $this->linkInReportFields("link", $fld, $action);
                    $show_area = $fld;
                    break;

                case "REPORTIMPORT":
                case "REPORTIMPORTITEM":
                    // Link in an item from another report
                    $this->linkInReportFields("import", $fld, $action);
                    $show_area = $fld;
                    break;

                case "SAVE":
                    $xmlsavefile = $this->query->xmloutfile;
                    if (!$xmlsavefile) {
                        trigger_error(ReporticoLang::templateXlate("UNABLE_TO_SAVE") . ReporticoLang::templateXlate("SPECIFYXML"), E_USER_ERROR);
                    }

                    break;

                case "PREPARESAVE":
                    $xmlsavefile = $this->query->xmloutfile;
                    $sessionClass::setReporticoSessionParam("execute_mode", "PREPARE");

                    if (!$xmlsavefile) {
                        header("HTTP/1.0 404 Not Found", true);
                        echo '<div class="reportico-error-box">' . ReporticoLang::templateXlate("UNABLE_TO_SAVE") . ReporticoLang::templateXlate("SPECIFYXML") . "</div>";
                        die;
                    }

                    break;

                case "DELETEREPORT":
                    $xmldeletefile = $this->query->xmloutfile;
                    break;

                case "HIDE":
                    $hide_area = $fld;
                    break;

                case "SHOW":
                    $show_area = $fld;
                    break;

                case "SQL":
                    $show_area = $fld;
                    if ($fld == "mainquerqury") {
                        // Main Query SQL Generation.
                        $sql = stripslashes($_REQUEST["mainquerqury_SQL"]);

                        $maintain_sql = $sql;
                        if ($this->query->loginCheck()) {
                            $p = new SqlParser($sql);
                            if ($p->parse()) {
                                $p->importIntoQuery($qr);
                                if ($this->query->datasource->connect()) {
                                    $p->testQuery($this->query, $sql);
                                }

                            }
                        }
                    } else {
                        // It's a lookup
                        if (preg_match("/mainquercrit(.*)qury/", $fld, $match1)) {
                            $lookup = (int) $match1[1];
                            $lookup_char = $match1[1];

                            // Access the relevant crtieria item ..
                            $qc = false;
                            $ak = array_keys($this->query->lookup_queries);
                            if (array_key_exists($lookup, $ak)) {
                                $q = $this->query->lookup_queries[$ak[$lookup]]->lookup_query;
                            } else {
                                $q = new Reportico();
                            }

                            // Parse the entered SQL
                            $sqlparm = $fld . "_SQL";
                            $sql = $_REQUEST[$sqlparm];
                            $q->maintain_sql = $sql;
                            $q = new Reportico();
                            $p = new SqlParser($sql);
                            if ($p->parse()) {
                                if ($p->testQuery($this->query, $sql)) {
                                    $p->importIntoQuery($q);
                                    $this->query->setCriteriaLookup($ak[$lookup], $q, "WHAT", "NOW");
                                }
                            }
                        }
                    }

                    break;

            }
        }

        // Now work out what the maintainance screen should be showing by analysing
        // whether user pressed a SHOW button a HIDE button or keeps a maintenance item
        // show by presence of a shown value
        if (!$show_area) {
            // User has not pressed SHOW_ button - this would have been picked up in previous submit
            // So look for longest shown item - this will allow us to draw the maintenace screen with
            // the correct item maximised
            foreach ($_REQUEST as $k => $req) {
                if (preg_match("/^shown_(.*)/", $k, $match)) {
                    $containee = "/^" . $hide_area . "/";
                    $container = $match[1];
                    if (!preg_match($containee, $container)) {
                        if (strlen($match[1]) > strlen($show_area)) {
                            $show_area = $match[1];
                        }
                    }
                }
            }

        }

        if (!$show_area) {
            $show_area = "mainquer";
        }

        $xmlout = new XmlWriter($this->query);
        $xmlout->prepareXmlData();

        // If Save option has been used then write data to the named file and
        // use this file as the defalt input for future queries
        if ($xmlsavefile) {
            if ($this->query->allow_maintain != "SAFE" && $this->query->allow_maintain != "DEMO" && ReporticoApp::getConfig('allow_maintain')) {
                $xmlout->writeFile($xmlsavefile);
                $sessionClass::setReporticoSessionParam("xmlin", $xmlsavefile);
                $sessionClass::unsetReporticoSessionParam("xmlintext");
            } else {
                trigger_error(ReporticoLang::templateXlate("SAFENOSAVE"), E_USER_ERROR);
            }

        }

        // If Delete Report option has been used then remove the file
        // use this file as the defalt input for future queries
        if ($xmldeletefile) {
            if ($this->query->allow_maintain != "SAFE" && $this->query->allow_maintain != "DEMO" && ReporticoApp::getConfig('allow_maintain')) {
                $xmlout->removeFile($xmldeletefile);
                $sessionClass::setReporticoSessionParam("xmlin", false);
                $sessionClass::unsetReporticoSessionParam("xmlintext");
            } else {
                trigger_error(ReporticoLang::templateXlate("SAFENODEL"), E_USER_ERROR);
            }

        }

        $xml = $xmlout->getXmldata();

        if ($this->query->top_level_query) {
            $this->query->xmlintext = $xml;
        }

        $this->query->xmlin = new XmlReader($this->query, false, $xml);
        $this->query->xmlin->show_area = $show_area;
        $this->query->maintain_sql = false;
    }
522924
function handleUserInfoResponse(_ref2) {
      var detail = _ref2.detail;

      this.__handleOpenDataResponse({
        type: detail.errMsg === 'getUserInfo:ok' ? 'resolve' : 'reject',
        data: detail
      });
    }
866458
private void postDelete(User user) throws Exception
   {
      for (UserEventListener listener : listeners)
      {
         listener.postDelete(user);
      }
   }
942541
public synchronized void use(Object user) {
		usage++;
		lastUsage = System.currentTimeMillis();
		if (users != null)
			users.add(user);
	}
1145812
void handleDataToListener(String dataId, ConsumerConfig config, ProviderInfoListener listener) {
        if (!canNotify()) {
            return;
        }
        if (lastUserData != null) {
            ComposeUserData composeUserData = composeUserAndConfigData(lastUserData, lastConfigData);
            notifyToListener(listener, composeUserData);
        }
    }
392221
def _handle_userCount(self, data):
        """"""

        self.room.user_count = data
        self.conn.enqueue_data("user_count", self.room.user_count)
1351970
protected void addUser(String key, User<PERM> user) {
		userMap.put(key, user);
	}
1227783
private void initializeMe(){
		Long pattern = Long.valueOf(0);
		ioExceptions = StatValueFactory.createStatValue(pattern, "ioexceptions", getSelectedIntervals());
		servletExceptions = StatValueFactory.createStatValue(pattern, "servletExceptions", getSelectedIntervals());
		runtimeExceptions = StatValueFactory.createStatValue(pattern, "runtimeExceptions", getSelectedIntervals());
		addStatValues(ioExceptions, servletExceptions, runtimeExceptions);
	}
903459
function (data) {
    var user = this$1.onSuccess(data);
    if (isFunction(onSuccess)) {
      onSuccess(user);
    }
    return user
  }
731287
public void handle(RequestContext context, AuthenticationException e) throws SecurityProviderException,
            IOException {
        saveRequest(context);

        String loginFormUrl = getLoginFormUrl();

        if (StringUtils.isNotEmpty(loginFormUrl)) {
            RedirectUtils.redirect(context.getRequest(), context.getResponse(), loginFormUrl);
        } else {
            sendError(e, context);
        }
    }
1052185
@Override
    public void handle(RequestContext context, AccessDeniedException e) throws SecurityProviderException, IOException {
        saveException(context, e);

        if (StringUtils.isNotEmpty(getErrorPageUrl())) {
            forwardToErrorPage(context);
        } else {
            sendError(e, context);
        }
    }
880569
public function handleRename() {
		$id = $this->request->getQuery("id");
		$newName = $this->request->getQuery("newName");
		$token = $this->request->getQuery("token");
		
		$cache = $this->uploadControl->getCache();
		/** @noinspection PhpInternalEntityUsedInspection */
		$cacheFiles = $cache->load($this->uploadControl->getTokenizedCacheName($token));
		
		if(isset($cacheFiles[ $id ])) {
			/** @noinspection PhpInternalEntityUsedInspection */
			$cacheFiles[ $id ] = $this->uploadControl->getUploadModel()->rename($cacheFiles[ $id ], $newName);
			/** @noinspection PhpInternalEntityUsedInspection */
			$cache->save($this->uploadControl->getTokenizedCacheName($token), $cacheFiles);
		}
	}
1180564
@Override
	public void handleClientRequest(User user, ISFSObject params) {
		try {
			debugLogRequestInfo(user, params);
			ApiUser apiUser = getUserAgent(user);
	        for(RequestResponseClass clazz : listeners) {
	            Object userAgent = checkUserAgent(clazz, apiUser);
	            notifyListener(clazz, params, user, userAgent);
	        }
		} catch(Exception e) {
			processHandlerException(e, user);
		}
	}
1299524
protected void handleLoginSuccess(USER_ENTITY userEntity, LoginSpecifiedOption option) {
        assertUserEntityRequired(userEntity);
        final USER_BEAN userBean = saveLoginInfoToSession(userEntity);
        if (userBean instanceof SyncCheckable) {
            ((SyncCheckable) userBean).manageLastestSyncCheckTime(timeManager.currentDateTime());
        }
        if (option.isRememberMe()) {
            saveRememberMeKeyToCookie(userEntity, userBean);
        }
        if (!option.isSilentLogin()) { // mainly here
            saveLoginHistory(userEntity, userBean, option);
            processOnBrightLogin(userEntity, userBean, option);
        } else {
            processOnSilentLogin(userEntity, userBean, option);
        }
    }