Sets the credential data
@param $credential_id
433257
protected function setCredential($credential_id)
    {
        if (is_numeric($credential_id)) {
            $this->data_credential = $this->credential->get($credential_id);
            if (empty($this->data_credential)) {
                $this->outputHttpStatus(404);
            }
        }
    }
350701
protected function setPage($page_id)
    {
        $this->data_page = $this->page->get($page_id);

        if (empty($this->data_page)) {
            $this->outputHttpStatus(404);
        }

        $this->controlAccessPage();
        $this->preparePage($this->data_page);
    }
291334
def setCredentials(self, creds):
        """"""

        if isinstance(creds, UserKeyCredential):
            self.setUserKeyCredentials(creds.username, creds.public_key, creds.private_key)
        elif isinstance(creds, UserPassCredential):
            self.setUserPasswdCredentials(creds.username, creds.password)
121141
@Override
    public void setCredential(Subject subject) throws CredentialException {
        Set<WSPrincipal> principals = subject.getPrincipals(WSPrincipal.class);
        if (principals.isEmpty()) {
            return;
        }
        if (principals.size() != 1) {
            throw new CredentialException("Too many WSPrincipals in the subject");
        }
        WSPrincipal principal = principals.iterator().next();
        setCredential(subject, principal);
    }
636170
public void setCredentials(Element el, String username, String password, Credentials c) {
	if (c == null) return;
	if (c.getUsername() != null) el.setAttribute(username, c.getUsername());
	if (c.getPassword() != null) el.setAttribute(password, c.getPassword());
    }
1238126
public function setSessionId($session_id=null)
    {
        $this->session_id= ($session_id!== null) ? $session_id : null;

        return $this;
    }
494227
def SetCredentials(self, password=None, username=None):
    
    if password:
      self._password = password
    if username:
      self._user = username
46631
public function editUser($user_id = null)
    {
        $this->setUser($user_id);
        $this->setTitleEditUser();
        $this->setBreadcrumbEditUser();
        $this->controlAccessEditUser($user_id);

        $this->setData('user', $this->data_user);
        $this->setData('roles', $this->role->getList());
        $this->setData('can_delete', $this->canDeleteUser());
        $this->setData('is_superadmin', $this->isSuperadminUser());
        $this->setData('password_limit', $this->user->getPasswordLength());

        $this->submitEditUser();
        $this->outputEditUser();
    }
1286566
def credential_delete(self, *ids):
        
        return self.raw_query("credential", "delete", data={
            "credentials": [{"id": str(id)} for id in ids]
        })
1215064
public function setAuthentication($credentials)
    {
        $this->authentication = $credentials;
        curl_setopt($this->curl, CURLOPT_USERPWD, $credentials);
    }
650104
public static function setTelegramId(int $id, string $auth_key)
    {
        $user = static::findOne(['auth_key' => $auth_key]);
        if ($user !== null) {
            $user->userMeta->setTelegram($id);
            $user->telegramOn();
            return $user;
        }
        return null;
    }
392232
public function create($data, $credentialId = null)
    {
        if (isset($credentialId)) {
            return $this->client()->put($data, 'credentials/{credentialId}', ['credentialId' => $credentialId]);
        }

        return $this->client()->post($data, 'credentials');
    }
1034999
def set_credentials(self, username, password=None, region=None,
            tenant_id=None, authenticate=False):
        """"""
        self.username = username
        self.password = password
        self.tenant_id = tenant_id
        if region:
            self.region = region
        if authenticate:
            self.authenticate()
1262839
def SetCredentials(api_key,api_passwd):
	""""""
	global V1_API_KEY
	global V1_API_PASSWD
	global _V1_ENABLED
	_V1_ENABLED = True
	V1_API_KEY = api_key
	V1_API_PASSWD = api_passwd
334447
@Override
    public void setCredential(Subject subject) throws CredentialException {
        Hashtable<String, ?> customProperties = getBasicAuthHashtableFromSubject(subject);
        try {
            // Hashtable with basic auth information, all properties must be there.
            if (customProperties != null && !customProperties.isEmpty() && customProperties.size() == 3) {
                String realm = getRealm(customProperties);
                String securityName = getSecurityName(customProperties);
                SerializableProtectedString password = getPassword(customProperties);
                setBasicAuthCredential(subject, realm, securityName, password);
            }
        } finally {
            removeBasicAuthHashtable(subject, customProperties);
        }
    }
640679
public OvhCredential api_credential_credentialId_GET(Long credentialId) throws IOException {
		String qPath = "/me/api/credential/{credentialId}";
		StringBuilder sb = path(qPath, credentialId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhCredential.class);
	}
1340389
public function setAccountId($id)
    {
        if (!empty($id) && ctype_print($id)) {
            $this->account_id = $id;
        }

        return $this;
    }