Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists the other Subaccounts or services accounts that conflict with the specified username.

Examples 


 cPanel or Webmail Session URL
https://host.example.com:2083/cpsess##########/execute/UserManager/check_account_conflicts?full_username=example1%40example.com

Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List the other Subaccounts or services accounts that conflict with the specified username.
$UserManager = $cpanel->uapi(
    'UserManager', 'check_account_conflicts',
	array(
		'full_username'	=>	'example1@example.com'
	)
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List the other Subaccounts or services accounts that conflict with the specified username.
my $UserManager = $cpliveapi->uapi(
    'UserManager', 'check_account_conflicts',
	{	
	'full_username'	=>	'example1@example.com'
	}
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Template Toolkit
<!-- List the other Subaccounts or services accounts that conflict with the specified username. -->
[% execute('UserManager', 'check_account_conflicts', {'full_username' => 'example1@example.com'}) %]

Note:

For more information, read our Guide to Template Toolkit documentation. 

 

 Command Line
uapi --user=username UserManager check_account_conflicts full_username=example1%40example.com

Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{  
   "metadata":{  

   },
   "data":{  
      "conflict":0,
      "accounts":{  
         "username":"example1",
         "has_siblings":0,
         "avatar_url":null,
         "special":0,
         "has_expired_invite":0,
         "can_set_password":0,
         "dismissed":0,
         "can_delete":0,
         "full_username":"example1@example.com",
         "parent_type":null,
         "dismissed_merge_candidates":[  
            {  
               "phone_number":null,
               "services":{  
                  "ftp":{  
                     "enabled":0
                  },
                  "webdisk":{  
                     "enabled":0
                  },
                  "email":{  
                     "enabled":1,
                     "quota":0
                  }
               },
               "domain":"example.com",
               "type":"service",
               "alternate_email":null,
               "merge_candidates":[  

               ],
               "invite_expiration":null,
               "sub_account_exists":0,
               "real_name":null,
               "guid":"EXAMPLE1:EXAMPLE.COM:577D0D5A:2B4D73F79CF3CE3E19B43868123AEC8E696BF172AB7A00AB56352AADBABA65AA",
               "synced_password":0,
               "has_invite":0,
               "can_set_quota":1,
               "issues":[  

               ],
               "dismissed_merge_candidates":[  

               ],
               "parent_type":null,
               "full_username":"example1@example.com",
               "dismissed":0,
               "can_delete":1,
               "can_set_password":1,
               "special":0,
               "avatar_url":null,
               "has_expired_invite":0,
               "has_siblings":0,
               "username":"example1"
            },
            {  
               "has_siblings":0,
               "username":"example1",
               "avatar_url":null,
               "special":0,
               "has_expired_invite":0,
               "can_set_password":1,
               "dismissed":0,
               "can_delete":1,
               "full_username":"example1@example.com",
               "parent_type":null,
               "dismissed_merge_candidates":[  

               ],
               "issues":[  

               ],
               "can_set_quota":1,
               "synced_password":0,
               "has_invite":0,
               "guid":"EXAMPLE1:EXAMPLE.COM:577D0D5A:66F4C17B823CF20EC140744EFB801E1FD3FC790A7F5CB5B2791B1A0E3CF9CDF3",
               "real_name":null,
               "sub_account_exists":0,
               "invite_expiration":null,
               "merge_candidates":[  

               ],
               "alternate_email":null,
               "type":"service",
               "phone_number":null,
               "services":{  
                  "ftp":{  
                     "quota":"42.00",
                     "homedir":"example1@example.com",
                     "enabled":1
                  },
                  "webdisk":{  
                     "enabled":0
                  },
                  "email":{  

                  }
               },
               "domain":"example.com"
            },
            {  
               "has_siblings":0,
               "username":"example1",
               "avatar_url":null,
               "has_expired_invite":0,
               "special":0,
               "can_set_password":1,
               "full_username":"example1@example.com",
               "dismissed":0,
               "can_delete":1,
               "parent_type":null,
               "issues":[  

               ],
               "dismissed_merge_candidates":[  

               ],
               "has_invite":0,
               "synced_password":0,
               "can_set_quota":1,
               "sub_account_exists":0,
               "real_name":null,
               "guid":"EXAMPLE1:EXAMPLE.COM:577D0D5A:FC219834D5429CCAE072D7E7F8C5C7621A2160CED62F22A08F01D8EA66281F2C",
               "merge_candidates":[  

               ],
               "invite_expiration":null,
               "type":"service",
               "alternate_email":null,
               "domain":"example.com",
               "services":{  
                  "ftp":{  

                  },
                  "webdisk":{  
                     "enabled":1,
                     "homedir":"home/example/public_html/webdav",
                     "private":0,
                     "perms":"rw",
                     "enabledigest":1
                  },
                  "email":{  

                  }
               },
               "phone_number":null
            }
         ],
         "issues":[  

         ],
         "can_set_quota":0,
         "has_invite":0,
         "synced_password":0,
         "guid":"EXAMPLE1:EXAMPLE.COM:577D0D5A:368CACA9FDDBD28A68D3A75D3E8FF3A797808946873FDB456361CF0CEFCD507F",
         "real_name":null,
         "sub_account_exists":0,
         "invite_expiration":null,
         "merge_candidates":[  

         ],
         "alternate_email":null,
         "type":"hypothetical",
         "domain":"example.com",
         "services":{  
            "email":{  
               "enabled":0
            },
            "ftp":{  
               "enabled":0
            },
            "webdisk":{  
               "enabled":0
            }
         },
         "phone_number":null
      }
   },
   "errors":null,
   "messages":null,
   "status":1
}

Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

ParameterTypeDescriptionPossible valuesExample
full_usernamestring

Required

The Subaccount's username and domain name.

A valid username, the @ character, and the associated domain. example1@example.com

Returns

Note:

If the function returns more than one account, it will return some values multiple times within the return arrays.

ReturnTypeDescriptionPossible valuesExample
accountshashThis hash contains service accounts that match the full_username parameter's value.This hash includes the alternate_email, avatar_url, can_delete , can_set_password can_set_quota, dismissed, dismissed_merge_candidates, domain, full_username, guid, has_siblings, issues, merge_candidates, parent_type, phone_number, real_name, services, special, sub_account_exists, synced_password, type, and username returns. 

alternate_email

string

An alternate email address for the Subaccount's user.

The function returns this value in the accounts hash.

A valid email address. user@example.com

avatar_url

string

The user's Subaccount profile photo.

The function returns this value in the accounts hash.

A valid HTTPS URL that points to an image file.
 Click to view...

https://img.example.com/avatars/example.jpg

can_delete

Boolean

Whether the cPanel account user can delete the Subaccount.

The function returns this value in the accounts hash.

  • 1 — Can delete.
  • 0Cannot delete.
0

can_set_password

Boolean

Whether the cPanel account user can change the Subaccount's password.

The function returns this value in the accounts hash.

  • 1 — Can change password.
  • 0Cannot change password.

Note:

The function returns 0 for Subaccounts that inherit their password from the cPanel account.

1

can_set_quota

Boolean

Whether the cPanel account user can change the Subaccount's disk usage quota.

The function returns this value in the accounts hash.

  • 1 — Can change.
  • 0Cannot change.
0

dismissed

Boolean

Whether the cPanel account user dismissed the merge prompt for the service account.

Note:

Only service accounts return this value.

The function returns this value in the accounts hash.

 

  • 1 — Dismissed.
  • 0 — Did not dismiss.
1

dismissed_merge_candidates

array

An array of hashes that represent the service accounts that the user dismissed the merge prompt for.

The function returns this array in the accounts hash.

Note:

You can find descriptions for this array's returns within this table. 


This array will always return empty.

Note:

We reserved this return for future use.


 

 

domain

string

The Subaccount user's associated domain.

The function returns this value in the accounts hash.

A domain that the cPanel account owns.example.com

full_username

string

The Subaccount's username and domain name.

The function returns this value in the accounts hash.

A valid username, the @ character, and the associated domain.user@example.com

guid

string

The Subaccount's unique identifier.

The function returns this value in the accounts hash.

The system-assigned unique value.
 Click to view...

N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4

has_expired_invite

Boolean

Whether the Subaccount owns an expired invitation.

The function returns this value in the accounts hash.

Note:

We introduced this return in cPanel & WHM version 60. 


  • 1 — Owns an expired invitation.
  • 0 — Does not own an expired invitation.
0

has_invite

Boolean

Whether the Subaccount owns an active invitation.

The function returns this value in the accounts hash.

Note:

We introduced this return in cPanel & WHM version 60. 


  • 1 — Owns an invitation.
  • 0 — Does not own an invitation.
0

has_siblings

Boolean

Whether the service account shares the full_username parameter's value with another service account.

The function returns this value in the accounts hash.

  • 1 — Shares.
  • 0 — Does not share.
0

invite_expiration

 

The time at which the new Subaccount invitation will expire.

The function returns this value in the accounts hash.

Note:

We introduced this return in cPanel & WHM version 60. 


  • A valid Unix epoch time.
  • null

Note:

If the account does not own an active invitation, this value returns null .

1466258282

issues

array

Information about any issues or problems with the Subaccount.

The function returns this array in the accounts hash.

This array contains the type, area, service, message, used, and limit returns.

 

type

string

The type of issue.

The function returns this value in the issues array.

  • error
  • warning
  • info
info

area

string

The affected section of cPanel & WHM.

The function returns this value in the issues array.

quotaquota

service

string

The affected service.

The function returns this value in the issues array.

  • email
  • ftp
  • webdisk
email

message

string

The description of the issue.

The function returns this value in the issues array.

A valid string.Your account is over quota.

used

integer

The number of Megabytes (MB) that the account currently uses.

The function returns this value in the issues array.

A positive integer.2000

limit

integer

The set quota Megabyte (MB) limit for the affected Subaccount.

The function returns this value in the issues array.

A positive integer.1500

merge_candidates

array

An array of hashes that represent the service accounts that the system could merge for this Subaccount.

The function returns this value in the accounts hash.

Note:

You can find descriptions for this array's returns within this table. 


This array contains the alternate_email, avatar_url, can_delete, can_set_password, can_set_quota, dismissed, domain, full_username, guid, has_siblings, issues, merge_candidates, parent_type, phone_number, real_name, services, special, sub_account_exists, synced_password, type, and username returns. 

parent_type

string

The type of account that could own the service account.

The function returns this value in the accounts hash.

  • sub — A Subaccount.
  • hypothetical — A hypothetical Subaccount that does not yet exist, but that the user could create as part of a merge.
  • nullNot a merge candidate.

 

 hypothetical

phone_number

string

The Subaccount user's phone number.

The function returns this value in the accounts hash.

A valid phone number that conforms to ITU-T's E.164 -recommended standard for the representation of telephone numbers.+15551234567

real_name

string

The name of the Subaccount's user.

The function returns this value in the accounts hash.

  • A first name, a last name, or a first name and last name.
  • An empty string.
John Doe

services

hash

Information about the Subaccount's access to email, FTP, and Web Disk.

The function returns this hash in the accounts hash.

This hash includes the email, ftp, and webdisk returns. 

email

hash

Information that indicates the Subaccount's email status.

The function returns this hash in the services hash.

This hash includes the enabled and quota returns.

 

enabled

Boolean

Whether the Subaccount can access Webmail, POP, and IMAP services.

The function returns this value in the email hash.

  • 1 — Can access.
  • 0Cannot access.
1

quota

string

The Subaccount's email disk space quota.

The function returns this value in the email hash.

  • A positive integer between 1 and 999999 that represents the maximum disk space that the Subaccount may use, in Megabytes (MB).
  • 0 — Unlimited.
100

ftp

hash

This hash includes the information that indicates the Subaccount's FTP status.

The function returns this hash in the services hash.

This hash includes the enabled, quota, and homedir returns.

 

enabled

Boolean

Whether the Subaccount can access FTP.

The function returns this value in the ftp hash.

  • 1 — Can access.
  • 0Cannot access.
0

quota

string

The Subaccount's FTP disk space quota.

The function returns this value in the ftp hash.

  • An integer that represents the Subaccount's maximum FTP disk usage, in Megabytes (MB).
  • 0 — Unlimited.
100

homedir

string

The Subaccount's FTP home directory.

The function returns this value in the ftp hash.

A valid path, relative to the cPanel account's home directory./Subaccount

webdisk

hash

This hash includes the information that indicates the Subaccount's Web Disk status.

The function returns this hash in the services hash.

This hash includes the enabled, homedir, perms, and private returns.

 

enabled

Boolean

Whether the Subaccount can access Web Disk.

The function returns this value in the webdisk hash.

  • 1 — Can access.
  • 0Cannot access.
0

homedir

string

The Subaccount's Web Disk directory.

The function returns this value in the webdisk hash.

A valid path, relative to the cPanel account's home directory./bob

perms

string

Whether to grant write permissions to the Subaccount.

The function returns this value in the webdisk hash.

  • ro — Read-only permissions.
  • rw — Read and write permissions.
rw

private

Boolean

Whether to set the Web Disk directory's permissions to public or private.

The function returns this value in the webdisk hash.

  • 1 — Private (0700).
  • 0 — Public (0755).

0

special

Boolean

Whether the account is a system-created special account that the user cannot remove.

The function returns this value in the accounts hash.

  • 1 — Can remove.
  • 0 — Cannot remove.
1

sub_account_exists

Boolean

Whether a Subaccount exists with the same username.

The function returns this value in the accounts hash.

  • 1 — Exists.
  • 0 — Does not exist.

Note:

The function returns a null value if the account is not a service account.

0

synced_password

Boolean

Whether the user has synchronized the passwords for each of the Subaccount's service accounts.

The function returns this value in the accounts hash.

  • 1 — Synchronized.
  • 0 — Not synchronized.

Note:

The function returns a null value if the account is not a Subaccount.

0

type

 string

The type of account.

The function returns this value in the accounts hash.

  • sub — A Subaccount.
  • hypothetical — A hypothetical Subaccount that does not exist, but that the user could create as part of a merge.
  • service — A service account.
  • cpanel — The cPanel account.
sub

username

string

The username for the Subaccount.

The function returns this value in the accounts hash.

 

A username that meets the Subaccount name limitations.

  • Length — 64 characters
  • Characters — a-zA-Z0-9, dot (.), hyphen (-), underscore (_)

Note:

This value does not include the domain name.

example
conflictBoolean

Whether the system detected an account conflict.

The function returns this value in the accounts hash.

  • 1 — Conflict.
  • 0 — No conflict.
0