modifyUser

Back to index

Summary

Modifies a non-local (LDAP) user that is registered with CloudBees CD/RO (with certain limitations described below) or a local user.

Using modifyUser for non-local (LDAP) users:

You can use the following modifyUser arguments for non-local users that are registered with CloudBees CD/RO:

  • groupNames

  • removeAllGroups

You cannot use modifyUser for non-local users that are not registered with CloudBees CD/RO. You also cannot use the following modifyUser arguments for non-local users, regardless of whether they are registered with CloudBees CD/RO:

  • email

  • fullUserName

  • password

  • migrateSettings

  • newName

User or group lists:

The createUser and modifyUser commands can use an optional groupNames argument. The createGroup and modifyGroup commands can have an optional userNames argument. In each case, the argument is followed by a list of groups or names. Using ectool, your command string would be:

`ectool createGroup "New Group Name" --userNames "A Adams" "B Barker"`

To make this call via the Perl API, create a list of names and then pass a reference to the list as an optional parameter. The name of the optional parameter is singular, userName or userGroup; not the plural form used by ectool. For example:

# Run the procedure—pass a reference to the list of names $xPath = $cmdr\->createGroup("New Group Name", { "userName" => ['A Adams', 'B Burns'] });
You must specify a userName.
userName
Stringrequired
The user name.
clearPersonas
Booleanoptional
Clear personas for user, if modifying.
email
Stringoptional
Email address of the user.
fullUserName
Stringoptional
Full name of the user.
groupNames
Collectionoptional
List of groups that this user is in.
migrateSettings
Stringoptional
Migrate the user or group settings to this name.
newName
Stringoptional
The new name for an existing object that is being renamed.
password
Stringoptional
The users password.
personas
Collectionoptional
List of personas that this user has.
removeFromAllGroups
Booleanoptional
True to remove this user from all groups.
sessionPassword
Stringoptional
Session user's password. Used to re-verify identity before changing user passwords in the system.

Usage

Perl

$cmdr->modifyUser( "test-userName" # userName # optionals );

ectool

ectool modifyUser \ "test-userName" `# userName` \ # optionals

Examples

Perl

$cmdr->modifyUser("Betty Barker", {email => "bbarker@abc.com"});

ectool

ectool modifyUser "Betty Barker" --email "bbarker@abc.com"