当前位置: 首页>>代码示例>>PHP>>正文


PHP ParseUser::getObjectId方法代码示例

本文整理汇总了PHP中Parse\ParseUser::getObjectId方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseUser::getObjectId方法的具体用法?PHP ParseUser::getObjectId怎么用?PHP ParseUser::getObjectId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parse\ParseUser的用法示例。


在下文中一共展示了ParseUser::getObjectId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ParseUser

        $user = new ParseUser();
        $user->set("username", $email);
        $user->set("password", $pass);
        $user->set("email", $email);
        $user->set("corporate", true);
        $user->set("name", $company_name);
        $user->set("logo", $file);
        $user->set("logo_url", $file->getURL());
        unlink($target_dir . $name);
        // try signup
        try {
            $user->signUp();
            // Hooray! Let them use the app now.
            $_SESSION['login'] = "1";
            $_SESSION['email'] = $email;
            $_SESSION['userid'] = $user->getObjectId();
            header("Location: index.php");
        } catch (ParseException $ex) {
            // Show the error message somewhere and let the user try again.
            echo "Error: " . $ex->getCode() . " " . $ex->getMessage();
        }
    }
}
echo include "assets/templates/header.php";
?>
<br>
<br>

    <div id="login-overlay" class="modal-dialog">
      <div class="modal-content">
          <div class="modal-header">
开发者ID:shubDhond,项目名称:MarketBngWeb,代码行数:31,代码来源:register.php

示例2: dtestUserLoadedFromStorageFromLogIn

 public function dtestUserLoadedFromStorageFromLogIn()
 {
     ParseTestHelper::clearClass(ParseUser::$parseClassName);
     $fosco = new ParseUser();
     $fosco->setUsername('fosco');
     $fosco->setPassword('password');
     $fosco->signUp();
     $id = $fosco->getObjectId();
     $this->assertNotNull($id);
     ParseUser::logOut();
     ParseUser::_clearCurrentUserVariable();
     $current = ParseUser::getCurrentUser();
     $this->assertNull($current);
     ParseUser::logIn("fosco", "password");
     $current = ParseUser::getCurrentUser();
     $this->assertEquals($id, $current->getObjectId());
     ParseUser::_clearCurrentUserVariable();
     $current = ParseUser::getCurrentUser();
     $this->assertEquals($id, $current->getObjectId());
 }
开发者ID:nidalb,项目名称:baas,代码行数:20,代码来源:ParseUserTest.php

示例3: getUserWriteAccess

 /**
  * Get whether the given user is *explicitly* allowed to write this object.
  * Even if this returns false, the user may still be able to access it if
  * getPublicWriteAccess returns true or a role that the user belongs to has
  * write access.
  *
  * @param ParseUser $user
  *
  * @throws \Exception
  *
  * @return bool
  */
 public function getUserWriteAccess($user)
 {
     if (!$user->getObjectId()) {
         throw new Exception('cannot getWriteAccess for a user with null id');
     }
     return $this->getWriteAccess($user->getObjectId());
 }
开发者ID:aglo35,项目名称:vr_beta,代码行数:19,代码来源:ParseACL.php


注:本文中的Parse\ParseUser::getObjectId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。