diff options
author | Thomas Willingham <founder@kakste.com> | 2014-04-01 19:36:56 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2014-04-01 19:36:56 +0100 |
commit | f4dd8657cb8fc085c055ee2632188a965b17dc13 (patch) | |
tree | 7bfdbec3afcbc06670d63a4c04ebcbab1ffc59ff /include | |
parent | 78d7425a1d9de91343c60be1d0f0a467a674d84d (diff) | |
download | volse-hubzilla-f4dd8657cb8fc085c055ee2632188a965b17dc13.tar.gz volse-hubzilla-f4dd8657cb8fc085c055ee2632188a965b17dc13.tar.bz2 volse-hubzilla-f4dd8657cb8fc085c055ee2632188a965b17dc13.zip |
Let admins set a default expire days value.
Diffstat (limited to 'include')
-rw-r--r-- | include/identity.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/identity.php b/include/identity.php index eb0ba230b..d15f3861e 100644 --- a/include/identity.php +++ b/include/identity.php @@ -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) ); |