Merge pull request #390 from beardy-unixer/master
Let admins set a default expire days value.
This commit is contained in:
commit
5ae20dd59a
@ -224,10 +224,13 @@ function create_identity($arr) {
|
||||
$perms_vals .= ', ' . intval($v);
|
||||
}
|
||||
|
||||
$expire = get_config('system', 'default_expire_days');
|
||||
$expire = (($expire===false)? '0': $expire);
|
||||
|
||||
$r = q("insert into channel ( channel_account_id, channel_primary,
|
||||
channel_name, channel_address, channel_guid, channel_guid_sig,
|
||||
channel_hash, channel_prvkey, channel_pubkey, channel_pageflags $perms_keys )
|
||||
values ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d $perms_vals ) ",
|
||||
channel_hash, channel_prvkey, channel_pubkey, channel_pageflags, channel_expire_days $perms_keys )
|
||||
values ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d $perms_vals ) ",
|
||||
|
||||
intval($arr['account_id']),
|
||||
intval($primary),
|
||||
@ -238,7 +241,8 @@ function create_identity($arr) {
|
||||
dbesc($hash),
|
||||
dbesc($key['prvkey']),
|
||||
dbesc($key['pubkey']),
|
||||
intval($pageflags)
|
||||
intval($pageflags),
|
||||
intval($expire)
|
||||
);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user