Methods Summary | ||
---|---|---|
public
|
#
change_quota( string $user , int $diskquota , int $filequota = 0 )
Change disk and file count quotas for a given user
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
get_users( )
Get users belonging to account
Finds all applicable users created and returns an array consisting
of their information from /etc/passwd. Indexed by username.
The following indexes are provided:
uid: user id
gid: group id (which will be the same as the uid of the site admin)
home: home directory of the user
shell: path to the shell used by the user
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
usermod_driver( string $user , array $attributes )
usermod driver
Possible attribute keys
gecos: gecos/comment field
home: home directory
username: new username *DANGEROUS*
passwd: password encrypted via crypt()
pw_expire: number of days after which the password expires
pw_disable: date on which the account will expire (YYYY-MM-DD)
shell: user shell
pw_lock: lock/unlock password
pw_unlock
move_home: move home directory
private |
|
public
|
#
get_quota_history( string $mUser , int $mBegin = 0, int $mEnd = NULL )
array get_quota_history(string[, int = 0[, int = 0]])
|
|
public
|
#
get_quota( mixed $users = NULL )
Fetch storage and file quotas from the underlying quota subsystem
qused: disk space used in KB
qsoft: soft limit on disk space in KB
qhard: hard limit on disk space in KB
fused: files used
fsoft: soft limit on files
fhard: hard limit on files
Multi-user lookups returns a hash, while a
single-user lookup returns a single quota record
see |
|
public
|
#
change_gecos( string $user , string $gecos = NULL )
Change a user's gecos field
Updates the gecos field in /etc/passwd
If called by admin, change_gecos() takes two parameters:
$user and $gecos. Users only need to supply one parameter,
the new gecos value.
|
|
public
|
||
public
|
#
generate_quota_list( string $user = '', string $base = '/{home,usr/local,var/www,var/lib,var/log}', bool $sort = true )
Generate a list of files contributing towards the account quota
Upon successful generation, the list is stored under ~/filelist-<PANEL_BRAND>.txt
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
Methods inherited from Module\Skeleton\Standard |
---|
__construct() ,
setUserParameters() ,
autoloadModule() ,
__wakeup() ,
_invoke() ,
__debugInfo() ,
getExportedFunctions() ,
_reset() ,
cleanUserParameters() ,
query()
|
Constants Summary | ||
---|---|---|
public
array
|
DEPENDENCY_MAP
|
#
array (
0 => 'siteinfo',
1 => 'apache',
)
|
public
int
|
MIN_UID
|
#
1000
|
public
int
|
VIRT_MIN_UID
|
#
20000
|
public
int
|
USER_MAXLEN
|
#
32
|
Constants inherited from Module\Skeleton\Standard |
---|
DEPENDENCY_MAP
|
Properties Summary | ||
---|---|---|
protected
|
$uid_mappings
|
#
array (
)
|
protected
|
$exportedFunctions
|
#
array (
'*' => 2,
'flush' => 3,
'get_user_home' => 15,
'get_home' => 15,
'get_users' => 3,
'change_gecos' => 3,
'get_uid_from_username' => 3,
'get_username_from_uid' => 15,
'exists' => 3,
'get_quota' => 3,
'getpwnam' => 3,
)
|
Properties inherited from Module\Skeleton\Standard |
---|
$exportedFunctions ,
$username ,
$password ,
$domain ,
$user_id ,
$group_id ,
$permission_level ,
$session_id ,
$site ,
$site_id
|