The Hubzilla
|
Somme account related functions. More...
Functions | |
get_account_by_id ($account_id) | |
check_account_email ($email) | |
check_account_password ($password) | |
check_account_invite ($invite_code) | |
check_account_admin ($arr) | |
account_total () | |
account_store_lowlevel ($arr) | |
create_account ($arr) | |
verify_email_address ($arr) | |
send_reg_approval_email ($arr) | |
send_register_success_email ($email, $password) | |
account_allow ($hash) | |
Allows a user registration. More... | |
account_deny ($hash) | |
Denies an account registration. More... | |
account_approve ($hash) | |
downgrade_accounts () | |
Checks for accounts that have past their expiration date. More... | |
service_class_allows ($uid, $property, $usage=false) | |
Check service_class restrictions. More... | |
account_service_class_allows ($aid, $property, $usage=false) | |
Check service class restrictions by account. More... | |
service_class_fetch ($uid, $property) | |
Queries a service class value for a channel and property. More... | |
account_service_class_fetch ($aid, $property) | |
Queries a service class value for an account and property. More... | |
upgrade_link ($bbcode=false) | |
upgrade_message ($bbcode=false) | |
upgrade_bool_message ($bbcode=false) | |
get_account_techlevel ($account_id=0) | |
Somme account related functions.
account_allow | ( | $hash | ) |
Allows a user registration.
string | $hash |
Referenced by Zotlabs\Module\Regmod\get(), and Zotlabs\Module\Admin\Accounts\post().
account_approve | ( | $hash | ) |
Referenced by Zotlabs\Module\Regver\get().
account_deny | ( | $hash | ) |
Denies an account registration.
This does not have to go through user_remove() and save the nickname permanently against re-registration, as the person was not yet allowed to have friends on this system
string | $hash |
Referenced by Zotlabs\Module\Regver\get(), Zotlabs\Module\Regmod\get(), and Zotlabs\Module\Admin\Accounts\post().
account_service_class_allows | ( | $aid, | |
$property, | |||
$usage = false |
|||
) |
Check service class restrictions by account.
If there are no service_classes defined, everything is allowed. If $usage is supplied, we check against a maximum count and return true if the current usage is less than the subscriber plan allows. Otherwise we return boolean true or false if the property is allowed (or not) in this subscriber plan. An unset property for this service plan means the property is allowed, so it is only necessary to provide negative properties for each plan, or what the subscriber is not allowed to do.
Like service_class_allows() but queries directly by account rather than channel.
int | $aid | The account_id to check |
string | $property | The service class property to check for |
int | boolean | $usage | (optional) The value to check against |
Referenced by identity_check_service_class().
account_service_class_fetch | ( | $aid, | |
$property | |||
) |
Queries a service class value for an account and property.
Like service_class_fetch() but queries by account rather than channel.
int | $aid | The account_id to query |
string | $property | The service property name to check for |
Referenced by account_service_class_allows(), Zotlabs\Module\Manage\get(), Zotlabs\Module\New_channel\get(), Zotlabs\Module\Import\import_account(), and process_channel_sync_delivery().
account_store_lowlevel | ( | $arr | ) |
Referenced by create_account().
account_total | ( | ) |
Referenced by create_account(), and zot_site_info().
check_account_admin | ( | $arr | ) |
Referenced by create_account().
check_account_email | ( | ) |
Referenced by create_account(), and Zotlabs\Module\Register\init().
check_account_invite | ( | $invite_code | ) |
Referenced by create_account(), and Zotlabs\Module\Register\init().
check_account_password | ( | $password | ) |
Referenced by create_account(), and Zotlabs\Module\Register\init().
create_account | ( | $arr | ) |
Referenced by Zotlabs\Module\Register\post().
downgrade_accounts | ( | ) |
Checks for accounts that have past their expiration date.
If the account has a service class which is not the site default, the service class is reset to the site default and expiration reset to never. If the account has no service class it is expired and subsequently disabled. called from include/poller.php as a scheduled task.
Reclaiming resources which are no longer within the service class limits is not the job of this function, but this can be implemented by plugin if desired. Default behaviour is to stop allowing additional resources to be consumed.
Referenced by Zotlabs\Daemon\Cron_daily\run().
get_account_by_id | ( | $account_id | ) |
Referenced by get_account_techlevel().
get_account_techlevel | ( | $account_id = 0 | ) |
Referenced by bbcode(), channel_apps(), Zotlabs\Module\New_channel\get(), Zotlabs\Module\Mail\get(), Zotlabs\Module\Register\get(), Zotlabs\Module\Settings\Channel\get(), get_features(), Zotlabs\Lib\ThreadItem\get_template_data(), nav(), Zotlabs\Render\SmartyTemplate\replace_macros(), and Zotlabs\Widget\Settings_menu\widget().
send_reg_approval_email | ( | $arr | ) |
Referenced by Zotlabs\Module\Register\post().
send_register_success_email | ( | $email, | |
$password | |||
) |
Referenced by Zotlabs\Module\Register\post().
service_class_allows | ( | $uid, | |
$property, | |||
$usage = false |
|||
) |
Check service_class restrictions.
If there are no service_classes defined, everything is allowed. If $usage is supplied, we check against a maximum count and return true if the current usage is less than the subscriber plan allows. Otherwise we return boolean true or false if the property is allowed (or not) in this subscriber plan. An unset property for this service plan means the property is allowed, so it is only necessary to provide negative properties for each plan, or what the subscriber is not allowed to do.
Like account_service_class_allows() but queries directly by account rather than channel. Service classes are set for accounts, so we look up the account for the channel and fetch the service class restrictions of the account.
int | $uid | The channel_id to check |
string | $property | The service class property to check for |
string | boolean | $usage | (optional) The value to check against |
Referenced by Zotlabs\Module\Item\item_check_service_class(), and new_contact().
service_class_fetch | ( | $uid, | |
$property | |||
) |
Queries a service class value for a channel and property.
Service classes are set for accounts, so look up the account for this channel and fetch the service classe of the account.
If no service class is available it returns false and everything should be allowed.
int | $uid | The channel_id to query |
string | $property | The service property name to check for |
Referenced by attach_store(), Zotlabs\Lib\Chatroom\create(), Zotlabs\Lib\Chatroom\enter(), Zotlabs\Module\Photos\get(), Zotlabs\Module\Item\item_check_service_class(), photo_upload(), Zotlabs\Module\Settings\Tokens\post(), process_channel_sync_delivery(), Zotlabs\Daemon\Poller\run(), Zotlabs\Daemon\Expire\run(), service_class_allows(), and Zotlabs\Widget\Follow\widget().
upgrade_bool_message | ( | $bbcode = false | ) |
upgrade_link | ( | $bbcode = false | ) |
Referenced by upgrade_bool_message(), and upgrade_message().
upgrade_message | ( | $bbcode = false | ) |
verify_email_address | ( | $arr | ) |
Referenced by Zotlabs\Module\Register\post().