本文整理匯總了PHP中access::private_key方法的典型用法代碼示例。如果您正苦於以下問題:PHP access::private_key方法的具體用法?PHP access::private_key怎麽用?PHP access::private_key使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類access
的用法示例。
在下文中一共展示了access::private_key方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: reset_private_key
public function reset_private_key()
{
// Generate a new (random) private key.
module::set_var("fotomotorw", "fotomoto_private_key", md5(random::hash() . access::private_key()));
message::success(t("Your Photomoto private key has been reset."));
url::redirect("admin/fotomotorw");
}
示例2: get_access_token
static function get_access_token($user_id)
{
$key = ORM::factory("user_access_token")->where("user_id", "=", $user_id)->find();
if (!$key->loaded()) {
$key->user_id = $user_id;
$key->access_key = md5(md5(uniqid(mt_rand(), true) . access::private_key()));
$key->save();
}
return $key;
}
示例3: install
static function install()
{
// Set up some default values.
module::set_var("fotomotorw", "fotomoto_site_key", '');
module::set_var("fotomotorw", "fotomoto_private_key", md5(random::hash() . access::private_key()));
module::set_var("fotomotorw", "fotomoto_buy_prints", 1);
module::set_var("fotomotorw", "fotomoto_buy_cards", 1);
module::set_var("fotomotorw", "fotomoto_buy_download", 1);
module::set_var("fotomotorw", "fotomoto_share_ecard", 1);
module::set_var("fotomotorw", "fotomoto_share_facebook", 1);
module::set_var("fotomotorw", "fotomoto_share_twitter", 1);
module::set_var("fotomotorw", "fotomoto_share_digg", 1);
module::set_version("fotomotorw", 1);
}
示例4: client_token
static function client_token()
{
return md5("l10n_client_client_token" . access::private_key());
}
示例5: access_key
static function access_key()
{
$key = ORM::factory("user_access_key")->where("user_id", "=", identity::active_user()->id)->find();
if (!$key->loaded()) {
$key->user_id = identity::active_user()->id;
$key->access_key = md5(random::hash() . access::private_key());
$key->save();
}
return $key->access_key;
}