AccountManager

class OC\Accounts\AccountManager
Class AccountManager
Manage system accounts table
Source:lib/private/Accounts/AccountManager.php#59
Implements:OCP\Accounts\IAccountManager

Properties

Methods

public OC\Accounts\AccountManager::__construct($connection, $config, $eventDispatcher, $jobList, $logger)
Source:lib/private/Accounts/AccountManager.php#82
protected OC\Accounts\AccountManager::parsePhoneNumber($input)
Source:

lib/private/Accounts/AccountManager.php#99

Parameters:
  • $input (string)
Returns:

string Provided phone number in E.164 format when it was a valid number

Throws:

\InvalidArgumentException When the phone number was invalid or no default region is set and the number doesn’t start with a country code

protected OC\Accounts\AccountManager::parseWebsite($input)
Source:

lib/private/Accounts/AccountManager.php#129

Parameters:
  • $input (string)
Returns:

string

Throws:

\InvalidArgumentException When the website did not have http(s) as protocol or the host name was empty

public OC\Accounts\AccountManager::updateUser($user, $data, $throwOnData=false)
update user record
Source:

lib/private/Accounts/AccountManager.php#151

Parameters:
  • $user (OCP\IUser)
  • $data (array)
  • $throwOnData (bool) Set to true if you can inform the user about invalid data
Returns:

array The potentially modified data (e.g. phone numbers are converted to E.164 format)

Throws:

\InvalidArgumentException Message is the property that was invalid

public OC\Accounts\AccountManager::deleteUser($user)
delete user from accounts table
Source:

lib/private/Accounts/AccountManager.php#253

Parameters:
public OC\Accounts\AccountManager::deleteUserData($user)
delete user from accounts table
Source:

lib/private/Accounts/AccountManager.php#268

Parameters:
public OC\Accounts\AccountManager::getUser($user)
get stored data from a given user
Source:

lib/private/Accounts/AccountManager.php#284

Parameters:
Returns:

array

Deprecated:

use getAccount instead to make sure migrated properties work correctly

public OC\Accounts\AccountManager::searchUsers($property, $values)
Source:lib/private/Accounts/AccountManager.php#313
protected OC\Accounts\AccountManager::checkEmailVerification($oldData, $newData, $user)
check if we need to ask the server for email verification, if yes we create a cronjob
Source:

lib/private/Accounts/AccountManager.php#343

Parameters:
Returns:

array

protected OC\Accounts\AccountManager::addMissingDefaultValues($userData)
make sure that all expected data are set
Source:

lib/private/Accounts/AccountManager.php#367

Parameters:
  • $userData (array)
Returns:

array

protected OC\Accounts\AccountManager::updateVerifyStatus($oldData, $newData)
reset verification status if personal data changed
Source:

lib/private/Accounts/AccountManager.php#384

Parameters:
  • $oldData (array)
  • $newData (array)
Returns:

array

protected OC\Accounts\AccountManager::insertNewUser($user, $data)
add new user to accounts table
Source:

lib/private/Accounts/AccountManager.php#438

Parameters:
protected OC\Accounts\AccountManager::updateExistingUser($user, $data)
update existing user in accounts table
Source:

lib/private/Accounts/AccountManager.php#461

Parameters:
protected OC\Accounts\AccountManager::writeUserData($user, $data)
Source:lib/private/Accounts/AccountManager.php#474
protected OC\Accounts\AccountManager::buildDefaultUserRecord($user)
build default user record in case not data set exists yet
Source:

lib/private/Accounts/AccountManager.php#501

Parameters:
Returns:

array

public OC\Accounts\AccountManager::getAccount($user)
Source:lib/private/Accounts/AccountManager.php#554
public OC\Accounts\AccountManager::updateAccount($account)
Source:lib/private/Accounts/AccountManager.php#558