Sets the admin password for add operations in a subtree. If the
parameter is left empty, the search admin password will be used instead.

@param string $add_pw The admin password for add operations
432518
public function setAddPassword($add_pw) {
		if(!empty($add_pw)) {
			$this->add_pw = $add_pw;
		}
		else
		{
			$this->add_pw = $this->password;
		}
	}
8051
private void doUpdateDefaultPassword() throws PageException {
	try {
	    admin.updateDefaultPassword(getString("admin", action, "newPassword"));
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}
	store();
    }
1060172
public Status setPassword(final String _newPasswd)
        throws EFapsException
    {
        final Type type = CIAdminUser.Person.getType();
        if (_newPasswd.length() == 0) {
            throw new EFapsException(getClass(), "PassWordLength", 1, _newPasswd.length());
        }
        final Update update = new Update(type, "" + getId());
        final Status status = update.add(CIAdminUser.Person.Password, _newPasswd);
        if (status.isOk()) {
            update.execute();
            update.close();
        } else {
            Person.LOG.error("Password could not be set by the Update, due to restrictions " + "e.g. length???");
            throw new EFapsException(getClass(), "TODO");
        }
        return status;
    }
638927
public function SetRconPassword( $Password )
		{
			if( !$this->Connected )
			{
				throw new SocketException( 'Not connected.', SocketException::NOT_CONNECTED );
			}
			
			switch( $this->Socket->Engine )
			{
				case SourceQuery::GOLDSOURCE:
				{
					$this->Rcon = new GoldSourceRcon( $this->Socket );
					
					break;
				}
				case SourceQuery::SOURCE:
				{
					$this->Rcon = new SourceRcon( $this->Socket );
					
					break;
				}
			}
			
			$this->Rcon->Open( );
			$this->Rcon->Authorize( $Password );
		}
902919
func (s *MemberFabricConfiguration) SetAdminPassword(v string) *MemberFabricConfiguration {
	s.AdminPassword = &v
	return s
}
1013778
public function setPassword($pw)
    {
        $fe = new \Concrete\Core\File\Event\FileWithPassword($this);
        $fe->setFilePassword($pw);
        Events::dispatch('on_file_set_password', $fe);

        $this->fPassword = $pw;
        $this->save();
    }
315084
public function update($data, $user_id, $updatePassword = true)
    {
        //Basic definition with only an id
        $fields = array('ID' => $user_id);

        //Update name
        if (AD_UPDATE_NAME && isset($data->displayname) && !empty($data->displayname)) {
            $name = $this->format::parseDisplayName($data->displayname, $data);

            $fields['first_name'] = $name['firstname'];
            $fields['last_name'] = $name['lastname'];
            $fields['display_name'] = $name['firstname'] . " " . $name['lastname'];
        }

        //Update email
        if (isset($data->mail) && is_email($data->mail) && AD_UPDATE_EMAIL) {
            $fields['user_email'] = strtolower($data->mail);
        }

        //Update password
        if ($updatePassword === true) {
            // Get user object
            $user = get_user_by('ID', $user_id);
            if ($user && !AD_RANDOM_PASSWORD && AD_SAVE_PASSWORD && isset($_POST['pwd']) && !empty($_POST['pwd'])) {
                // Update pw if saved pw and input does not match
                if (!wp_check_password($_POST['pwd'], $user->data->user_pass, $user->ID)) {
                    $fields['user_pass'] = $_POST['pwd'];
                }
            } elseif (AD_RANDOM_PASSWORD) {
                $passUpdated = get_user_meta($user_id, 'pass_updated', true);
                if ($passUpdated == false || strtotime($passUpdated) < strtotime('now - 3 month')) {
                    $fields['user_pass'] = wp_generate_password();
                    update_user_meta($user_id, 'pass_updated', current_time('mysql'));
                }
            }
        }

        //Update fields
        if (count($fields) != 1) {
            wp_update_user($fields);
        }

        //Update meta
        if (AD_UPDATE_META && (is_object($data) || is_array($data))) {
            foreach ((array)$data as $meta_key => $meta_value) {
                if (!in_array($meta_key, apply_filters('adApiWpIntegration/profile/disabledMetaKey', array("sn", "samaccountname", "mail", "userprincipalname")))) {
                    update_user_meta($user_id, AD_META_PREFIX . apply_filters('adApiWpIntegration/profile/metaKey', $meta_key), $meta_value);
                }
            }
        }

        //Last updated by ad timestamp
        update_user_meta($user_id, AD_META_PREFIX . apply_filters('adApiWpIntegration/profile/metaKey', "last_sync"), date("Y-m-d H:i:s"));
    }
868883
private static void setupSimpleSecurityProperties(Hashtable<String,Object> env,
			String userDn, char[] pwd)
	{
		// 'simple' = username + password
		env.put(Context.SECURITY_AUTHENTICATION, "simple");

		// add the full user dn
		env.put(Context.SECURITY_PRINCIPAL, userDn);

		// set password
		env.put(Context.SECURITY_CREDENTIALS, new String(pwd));
	}
826346
protected function setTitleEditCredential()
    {
        if (isset($this->data_credential['name'])) {
            $text = $this->text('Edit %name', array('%name' => $this->data_credential['name']));
        } else {
            $text = $this->text('Add credential');
        }

        $this->setTitle($text);
    }
304378
public function setAddDN($add_dn) {
		if(!empty($add_dn)) {
			$this->add_dn = $add_dn;
		}
		else
		{
			$this->add_dn = $this->dn;
		}
	}
542256
function setPassword($address, $password)
    {
        if (strpos($address, '@')) {
            list($data['email'], $data['domain']) = explode('@', $address);
        }
        else {
            list($data['email'], $data['domain']) = array($address, '');
        }

        $data['password'] = $password;

        // Get the cPanel user
        $query = $this->xmlapi->listaccts('domain', $data['domain']);
        $query = json_decode($query, true);
        if ( $query['status'] != 1) {
            return false;
        }
        $cpanel_user = $query['acct'][0]['user'];

        $query  = $this->xmlapi->api2_query($cpanel_user, 'Email', 'passwdpop', $data);
        $query  = json_decode($query, true);
        $result = $query['cpanelresult']['data'][0];

        if ($result['result'] == 1) {
            return PASSWORD_SUCCESS;
        }

        if ($result['reason']) {
            return array(
                'code'    => PASSWORD_ERROR,
                'message' => $result['reason'],
            );
        }

        return PASSWORD_ERROR;
    }
718096
public static function addPassword($passhash, $user = null)
	{
		$hzuph = self::getInstance($user);
		$hzuph->add($passhash);

		return true;
	}
114762
public function force_password($pass, $id){
    if ( $this->check() ){
      return $this->db->insert($this->class_cfg['tables']['passwords'], [
        $this->class_cfg['arch']['passwords']['pass'] => $this->_crypt($pass),
        $this->class_cfg['arch']['passwords']['id_user'] => $id,
        $this->class_cfg['arch']['passwords']['added'] => date('Y-m-d H:i:s')
      ]);
    }
    return false;
  }
279772
def set_user_passwd(self, userid, data):
        """"""
        return self.api_call(
            ENDPOINTS['users']['password'],
            dict(userid=userid),
            body=data)
1139852
public boolean setPassword(final String _name,
                               final String _newpasswd,
                               final String _oldpasswd)
        throws LoginException
    {
        boolean ret = false;

        final LoginContext login = new LoginContext(
                this.application,
                new SetPasswordCallbackHandler(ActionCallback.Mode.SET_PASSWORD, _name, _newpasswd, _oldpasswd));
        login.login();
        ret = true;
        return ret;
    }
1365363
protected function preSetHook(&$data)
    {
        // check if we are trying to edit any protected fields,
        // i.e. password or email address, that require the current
        // password to be changed
        $passwordRequired = false;

        foreach ($data as $key => $value) {
            if (static::hasProperty($key)) {
                if (in_array($key, static::$protectedFields)) {
                    // protected fields, i.e. passwords, are not allowed
                    // to be set to empty values
                    if (strlen(implode((array) $value)) == 0) {
                        unset($data[$key]);
                        continue;
                    }

                    $passwordRequired = true;
                }

                $data[$key] = $value;
            }
        }

        // verify the given current password, when required
        $auth = $this->getApp()['auth'];
        if ($passwordRequired && !$this->can('skip-password-required', $auth->getCurrentUser())) {
            $password = array_value($data, 'current_password');
            $strategy = $auth->getStrategy('traditional');
            if (!$strategy->verifyPassword($this, $password)) {
                $this->getErrors()->add('invalid_password');

                return false;
            }
        }

        $this->_changedPassword = isset($data['password']) && !$this->isTemporary();

        return true;
    }
520734
private void setUserPasswordStatus(CmsUser user, boolean reset) {

        if (reset) {
            user.setAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET, "true");
        } else {
            user.deleteAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET);
        }
        CmsUserTable.USER_PASSWORD_STATUS.put(user.getId(), new Boolean(reset));
    }