本文整理汇总了PHP中Zend_OpenId::absoluteURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_OpenId::absoluteURL方法的具体用法?PHP Zend_OpenId::absoluteURL怎么用?PHP Zend_OpenId::absoluteURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_OpenId
的用法示例。
在下文中一共展示了Zend_OpenId::absoluteURL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save(Default_Model_User $user)
{
$data = array('username' => $user->getUsername(), 'password' => md5($user->getUsername() . $user->getPassword()), 'created' => date('Y-m-d H:i:s'), 'openid' => Zend_OpenId::absoluteURL('/openid/' . $user->getUsername()), 'user_type' => $user->getUserType());
if (null === ($id = $user->getId())) {
$id = $this->getDbTable()->insert($data);
} else {
$this->getDbTable()->update($data, array('id = ?' => $id));
}
return $id;
}
示例2: indexAction
public function indexAction()
{
$this->view->headTitle("User", 'PREPEND');
$openid = $this->getRequest()->getParam('openid');
if (isset($openid)) {
$this->view->openIdServer = Zend_OpenId::absoluteURL("/provider/");
} else {
$this->_redirect('/user/login');
}
}
示例3: addUser
/**
* Register new user with given $id and $password
* Returns true in case of success and false if user with given $id already
* exists
*
* @param string $id user identity URL
* @param string $password encoded user password
* @return bool
*/
public function addUser($id, $password)
{
// escaping not required as values are inserted as parameters
$user = array('username' => $id, 'password' => $password, 'created' => date('Y-m-d H:i:s'), 'openid' => Zend_OpenId::absoluteURL('/openid/' . $id));
if ($this->hasUser($id)) {
return false;
} else {
$this->_usersTable->insert($user);
}
return true;
}