本文整理匯總了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;
}