Overview
  • Namespace
  • Class

Namespaces

  • Omines
    • DirectAdmin
      • Context
      • Objects
        • Database
        • Domains
        • Email
        • Users
      • Utility

Classes

  • AdminContext
  • BaseContext
  • ResellerContext
  • UserContext

Class AdminContext

Context for administrator functions.

Omines\DirectAdmin\Context\BaseContext
Extended by Omines\DirectAdmin\Context\UserContext
Extended by Omines\DirectAdmin\Context\ResellerContext
Extended by Omines\DirectAdmin\Context\AdminContext
Namespace: Omines\DirectAdmin\Context
Author: Niels Keurentjes niels.keurentjes@omines.com
Located at DirectAdmin/Context/AdminContext.php

Methods summary

public Omines\DirectAdmin\Objects\Users\Admin
# createAdmin( string $username, string $password, string $email )

Creates a new Admin level account.

Creates a new Admin level account.

Parameters

$username
$password
$email

Returns

Omines\DirectAdmin\Objects\Users\Admin
The newly created Admin
public Omines\DirectAdmin\Objects\Users\Reseller
# createReseller( string $username, string $password, string $email, string $domain, string|array $package = [], string $ip = 'shared' )

Creates a new Reseller level account.

Creates a new Reseller level account.

Parameters

$username
$password
$email
$domain
$package
Either a package name or an array of options for custom
$ip
shared, sharedreseller or assign. Defaults to 'shared'

Returns

Omines\DirectAdmin\Objects\Users\Reseller

Url

http://www.directadmin.com/api.html#create for options to use.
public Omines\DirectAdmin\Objects\Users\Admin[]
# getAdmins( )

Returns a list of known admins on the server.

Returns a list of known admins on the server.

Returns

Omines\DirectAdmin\Objects\Users\Admin[]
public Omines\DirectAdmin\Objects\Users\User[]
# getAllAccounts( )

Returns a full list of all accounts of any type on the server.

Returns a full list of all accounts of any type on the server.

Returns

Omines\DirectAdmin\Objects\Users\User[]
public Omines\DirectAdmin\Objects\Users\User[]
# getAllUsers( )

Returns a full list of all users on the server, so no resellers or admins.

Returns a full list of all users on the server, so no resellers or admins.

Returns

Omines\DirectAdmin\Objects\Users\User[]
public null|Omines\DirectAdmin\Objects\Users\Reseller
# getReseller( string $username )

Returns a specific reseller by name, or NULL if there is no reseller by this name.

Returns a specific reseller by name, or NULL if there is no reseller by this name.

Parameters

$username

Returns

null|Omines\DirectAdmin\Objects\Users\Reseller
public Omines\DirectAdmin\Objects\Users\Reseller[]
# getResellers( )

Returns the list of known resellers.

Returns the list of known resellers.

Returns

Omines\DirectAdmin\Objects\Users\Reseller[]
public Omines\DirectAdmin\Context\AdminContext
# impersonateAdmin( string $username, boolean $validate = false )

Returns a new AdminContext acting as the specified admin.

Returns a new AdminContext acting as the specified admin.

Parameters

$username
$validate
Whether to check the admin exists and is an admin

Returns

Omines\DirectAdmin\Context\AdminContext
public Omines\DirectAdmin\Context\ResellerContext
# impersonateReseller( string $username, boolean $validate = false )

Returns a new ResellerContext acting as the specified reseller.

Returns a new ResellerContext acting as the specified reseller.

Parameters

$username
$validate
Whether to check the reseller exists and is a reseller

Returns

Omines\DirectAdmin\Context\ResellerContext

Methods inherited from Omines\DirectAdmin\Context\ResellerContext

createAccount(), createUser(), deleteAccount(), deleteAccounts(), getIPs(), getUser(), getUsers(), impersonateUser(), suspendAccount(), suspendAccounts(), unsuspendAccount(), unsuspendAccounts()

Methods inherited from Omines\DirectAdmin\Context\UserContext

__construct(), getContextUser(), getDomain(), getDomains(), getType(), getUsername()

Methods inherited from Omines\DirectAdmin\Context\BaseContext

getConnection(), invokeApiGet(), invokeApiPost()

API documentation generated by ApiGen