Skip to main content

Account status operations

Disable Account

Disables an account.

Signature: def disable(cinfo)

Parameters:

  • cinfo['acctid'] - The account that should be disabled

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already disabled before doing any modifications, the function should return ACSuccess.

Enable Account

Enables an account.

Signature: def enable(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be enabled

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already enabled before doing any modifications, the function should return ACSuccess.

Expire Account

Expires an account

Signature: def expireacct(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be expired

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already expired before doing any modifications, the function should return ACSuccess.

Is Account Enabled

Check if an account is expired.

Signature: def isenabled(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be checked

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

The agent.isEnabled callback should be used to return the status of the account. See the agent.isEnabled callback page for full details.

Is Account Expired

Checks if an account is expired.

Signature: def isacctexpired(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be checked

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

The agent.isAcctExpired callback should be used to return the status of the account. See the agent.isAcctExpired callback page for full details.

Is Account Locked

Checks if an account is locked.

Signature: def islocked(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be checked

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

The agent.isLocked callback should be used to return the status of the account. See the agent.isLocked callback page for full details.

Lock Account

Locks an account.

Signature: def lock(cinfo)

Parameters:

  • cinfo['acctid'] - The account to be locked

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already locked before doing any modifications, the function should return ACSuccess.

Unexpire Account

Unexpires an account.

Signature: def unexpireacct(cinfo)

Parameters:

  • cinfo['acctid'] - The account that should be unexpired

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already not expired before doing any modifications, the function should return ACSuccess.

Unlock Account

Unlocks an account.

Signature: def unlock(cinfo)

Parameters:

  • cinfo['acctid'] - The account that should be unlocked

Return Value:

  • ACSuccess 0

  • ACUnknownError 1

  • ACOperationNotSupported 2

  • ACInvalidUser 7

Remarks:

If the account is already unlocked before doing any modifications, the function should return ACSuccess.