本文整理汇总了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;
}