Get admin group Label

@param string $login
@return string
777879
public function getGroupLabel($login)
    {
        $group = $this->adminGroupsHelper->getLoginUserGroups($login);

        $groupName = "Admin";
        if ($group) {
            if ($groupName) {
                $groupName = $this->adminGroupsHelper->getGroupLabel($group->getName());
            }
        }

        return $groupName;
    }
1117901
protected function getUserGroup($groupName)
    {
        $groupName = "admin:$groupName";

        $group = $this->userGroupFactory->getGroup($groupName);
        if (!$group) {
            $this->userGroupFactory->create($groupName);
            $group = $this->userGroupFactory->getGroup($groupName);
        }

        return $group;
    }
45610
protected function getUserSelect($login_name, $organization)
    {
        if ((0 == ($this->hoursResetKeyIsValid % 24)) || \Zend_Session::$_unitTestEnabled) {
            $resetExpr = 'CASE WHEN ADDDATE(gup_reset_requested, ' .
                    intval($this->hoursResetKeyIsValid / 24) .
                    ') >= CURRENT_TIMESTAMP THEN 1 ELSE 0 END';
        } else {
            $resetExpr = 'CASE WHEN DATE_ADD(gup_reset_requested, INTERVAL ' .
                    $this->hoursResetKeyIsValid .
                    ' HOUR) >= CURRENT_TIMESTAMP THEN 1 ELSE 0 END';
        }

        // 'user_group'       => 'gsf_id_primary_group', 'user_logout'      => 'gsf_logout_on_survey',
        $select = new \Zend_Db_Select($this->db);
        $select->from('gems__user_logins', array(
                    'user_login_id'       => 'gul_id_user',
                    'user_two_factor_key' => 'gul_two_factor_key',
                    'user_enable_2factor' => 'gul_enable_2factor',
                    'user_active'         => 'gul_can_login',
                    ))
                ->join('gems__respondent2org', 'gul_login = gr2o_patient_nr AND gul_id_organization = gr2o_id_organization', array(
                    'user_login'       => 'gr2o_patient_nr',
                    'user_base_org_id' => 'gr2o_id_organization',
                    'user_email'       => 'gr2o_email',
                    ))
               ->join('gems__respondents', 'gr2o_id_user = grs_id_user', array(
                    'user_id'             => 'grs_id_user',
                    'user_first_name'     => 'grs_first_name',
                    'user_surname_prefix' => 'grs_surname_prefix',
                    'user_last_name'      => 'grs_last_name',
                    'user_gender'         => 'grs_gender',
                    'user_locale'         => 'grs_iso_lang',
                    'user_birthday'       => 'grs_birthday',
                    'user_zip'            => 'grs_zipcode',
                    ))
               ->join('gems__organizations', 'gr2o_id_organization = gor_id_organization', array(
                    'user_group' => 'gor_respondent_group',
                    ))
                ->join('gems__groups', 'gor_respondent_group = ggp_id_group', array(
                    'user_role'              => 'ggp_role',
                    'user_allowed_ip_ranges' => 'ggp_allowed_ip_ranges',
                    ))
               ->joinLeft('gems__user_passwords', 'gul_id_user = gup_id_user', array(
                   'user_password_reset' => 'gup_reset_required',
                   'user_resetkey_valid' => new \Zend_Db_Expr($resetExpr),
                    'user_password_last_changed' => 'gup_last_pwd_change',
                  ))
               ->joinLeft('gems__reception_codes', 'gr2o_reception_code = grc_id_reception_code', array())
               ->where('ggp_group_active = 1')
               ->where('grc_success = 1')
               ->where('gul_can_login = 1')
               ->where('gul_login = ?')
               ->where('gul_id_organization = ?')
               ->limit(1);

        return $select;
    }
1325308
public static function statusLabel($status = null)
    {
        switch ($status) {
            case User::STATUS_ACTIVE:
                $label = 'info';
                $name = ArrayHelper::getValue(User::getStatuses(), $status);
                break;
            case User::STATUS_BANNED:
                $label = 'warning';
                $name = ArrayHelper::getValue(User::getStatuses(), $status);
                break;
            default:
                $label = 'default';
                $name = ArrayHelper::getValue(User::getStatuses(), User::STATUS_REGISTERED);
        }

        return Html::tag('span', $name, ['class' => 'label label-' . $label]);
    }
431062
public function getGroupLabel($groupName)
    {
        if (!isset($this->config[$groupName])) {
            return "";
        }

        return $this->config[$groupName]['label']->get();
    }
870307
public function logic($login) {
        #s如果上一次设置了and或or语句时忽略
        $expression = $this->build()->getBindExpression('where');
        if (empty($expression) || preg_match('/^\s*(OR|AND)\s*$/i', array_pop($expression))) {
            return false;
        }

        $this->build()->bindExpression('where', trim($login));

        return $this->connection;
    }
295901
public function getUser($login_name, $currentOrganization)
    {
        $user = $this->getUserClass($login_name, $currentOrganization);

        if ($this->allowLoginOnWithoutOrganization && (! $currentOrganization)) {
            $user->setCurrentOrganization($user->getBaseOrganizationId());
        } else {
            // Check: can the user log in as this organization, if not load non-existing user
            if (! $user->isAllowedOrganization($currentOrganization)) {
                $user = $this->loadUser(self::USER_NOLOGIN, $currentOrganization, $login_name);
            }

            $user->setCurrentOrganization($currentOrganization);
        }

        return $user;
    }
195749
public function getServerInfo($login)
    {
        static $lockAcquired = false;

        if (isset($this->servers[$login])) {
            $cacheKey = $this->_getServerInfoCacheKey($login);
            $cacheResult = $this->serverInfoCache->fetch($cacheKey);
            if ($cacheResult) {
                return $cacheResult;
            } else if (!$lockAcquired) {
                // We don't have the lock, we need to get it before asking the dedicated.

                // Start Protected code.
                $this->semaphore->aquire($cacheKey);
                $lockAcquired = true;

                // Ask for data again, if cache filled from other instance then data from cache, if not wil do a call.
                $data = $this->getServerInfo($login);

                // End protected code.
                $lockAcquired = false;
                $this->semaphore->release($cacheKey);

                return $data;
            } else {
                // We have the lock, data not in cache get data from the server.
                $data = $this->_getServerInfo($login);
                $this->serverInfoCache->save($cacheKey, $data, $this->cacheTimeOutInfo);

                return $data;
            }
        }

        return null;
    }
606129
public function getUserSalt($login)
    {
        return substr(
            hash(self::DEFAULT_ALGO, $login . $this->config['salt']['common']), 
            $this->config['salt']['user.index'], 
            $this->config['salt']['user.length']
        );
    }
994052
public function get_label($data) {
        $operators = $this->get_operators();
        $operator  = $data['operator'];
        $value     = $data['value'];

        if (empty($operator)) {
            return '';
        }

        $a = new stdClass();
        $a->label    = $this->_label;
        $a->value    = '"'.s($this->_options[$value]).'"';
        $a->operator = $operators[$operator];

        return get_string('selectlabel', 'filters', $a);
    }
336500
public function uses12HourClockForUser($login)
    {
        if ($login == 'anonymous') {
            return false;
        }

        Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);

        $lang = $this->getModel()->uses12HourClock($login);

        return $lang;
    }
997618
public function getUserHubs($login)
    {
        $this->checkAliasName($login);

        return $this->adapter->get(sprintf('/users/%s/hubs', $login));
    }
927365
public function getFieldLabel($fieldName)
    {
        $result = $this->getField($fieldName, 'label_'.$this->locale, $this->getField($fieldName, 'label'));

        if ($result === null && array_key_exists($fieldName, $this->standardFieldLabels)) {
            $result = $this->standardFieldLabels[$fieldName];
        }

        if ($result === null) {
            $result = $fieldName;
        }

        return $result;
    }
1278021
public function getLanguageForUser($login)
    {
        if ($login == 'anonymous') {
            return false;
        }

        Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);

        $lang = $this->getModel()->getLanguageForUser($login);

        return $lang;
    }
282635
public function getUserLabel() {
        $label = '';
        $first = $this->user->getPropertyValues(GenerisRdf::PROPERTY_USER_FIRSTNAME);
        $label .= empty($first) ? '' : current($first);
        $last = $this->user->getPropertyValues(GenerisRdf::PROPERTY_USER_LASTNAME);
        $label .= empty($last) ? '' : ' '.current($last);
        $label = trim($label);
        if (empty($label)) {
            $login = $this->user->getPropertyValues(GenerisRdf::PROPERTY_USER_LOGIN);
            if (!empty($login)) {
                $label = current($login);
            }
        }
        if (empty($label)) {
            $rdflabel = $this->user->getPropertyValues(OntologyRdfs::RDFS_LABEL);
            $label =  empty($rdflabel) ? __('user') : current($rdflabel);
        }
        return $label;
    }
469238
public function getLabelOfName(string $labelName)
    {
        foreach ($this->labels as $label) {
            /** @var GmailLabelInterface $label */
            if ($label->getName() === $labelName) {
                return $label;
            }
        }

        return;
    }
885848
public function getLayoutForUser($login, $idDashboard)
    {
        $return = $this->getModel()->getLayoutForUser($login, $idDashboard);

        if (count($return) == 0) {
            return false;
        }

        return $return[0]['layout'];
    }