Exemplo n.º 1
0
<?php

require_once __DIR__ . '/../../../vendor/autoload.php';
$prismUrl = 'http://*****:*****@qq.com', 'password' => 'xinxin123', 'summary' => '测试测试');
$adminUserManager = new PrismLibAdminUserManager($prismUrl, $adminKey, $adminSecret);
$return = $adminUserManager->create($newProvider);
print_r($return);
//$client = new PrismClient('http://localhost:8080', 'key', 'secret');
//print_r($client);
Exemplo n.º 2
0
 /**
  * 创建一个用户
  * 因为email是主键,所以不再返回任何数据
  * 如需对用户进行操作,用email即可
  *
  * @params userinfo array('email'=>'')
  * @params conn array('host'=>'', 'key'=>'', 'secret'=>'')
  *
  * @return null
  */
 private function _createUser($userInfo, $conn)
 {
     $prismHost = $conn['host'];
     $key = $conn['key'];
     $secret = $conn['secret'];
     $requestParams = ['email' => $userInfo['email'], 'password' => $userInfo['password']];
     $caller = new PrismLibAdminUserManager($prismHost, $key, $secret);
     return $caller->create($requestParams);
 }