示例#1
0
 /**
  * Updathes the user metadata. This end up calling the path /users/{id_user}
  * To delete an attribute, just set it null. ie: [ 'old_attr' => null ]
  * It will only update the existing attrs and keep the others untouch
  * for more info:
  *       https://auth0.com/docs/apiv2#!/users/patch_users_by_id
  *
  * @return User data
  */
 public function updateUserMetadata($metadata)
 {
     $user = ApiUsers::update($this->domain, $this->getIdToken(), $this->user["user_id"], array('user_metadata' => $metadata));
     $this->setUser($user);
 }
示例#2
0
 /**
  * @param string $userId
  * @param string $data
  * @return mixed
  */
 protected function update($userId, $data)
 {
     return ApiUsers::update(Yii::$app->getModule('auth0')->domain, Yii::$app->getModule('auth0')->apiTokens['usersUpdate'], $userId, $data);
 }