MAIN_MENU
MAIN_MENU
Shout:: defines an set of utility methods for the Shout application.
Copyright 2005-2010 Alkaloid Networks LLC (http://projects.alkaloid.net)
See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.opensource.org/licenses/bsd-license.php.
checkRights(string $permname, $permmask = null, $numparents) : boolean
Checks for the given permissions for the current user on the given permission. Optionally check for higher-level permissions and ultimately test for superadmin priveleges.
string | $permname | Name of the permission to check |
$permmask | ||
$numparents |
the effective permissions for the user.
genDeviceAuth(string $account) : array
Generate new device authentication tokens.
This method is designed to generate random strings for the authentication ID and password. The result is intended to be used for automatically generated device information. The user is prevented from specifying usernames and passwords for these reasons: 1) If a username and/or password can be easily guessed, monetary loss is likely through the fraudulent placing of telephone calls. This has been observed in the wild far too many times already.
2) The username and password are only needed to be programmed into the device once, and then stored semi-permanently. In some cases, the provisioning can be done automatically. For these reasons, having user-friendly usernames and passswords is not terribly important.
string | $account | Account for this credential pair |
Array of (string $deviceID, string $devicePassword)