• <small id='L95Qq'></small><noframes id='L95Qq'>

  • <i id='L95Qq'><tr id='L95Qq'><dt id='L95Qq'><q id='L95Qq'><span id='L95Qq'><b id='L95Qq'><form id='L95Qq'><ins id='L95Qq'></ins><ul id='L95Qq'></ul><sub id='L95Qq'></sub></form><legend id='L95Qq'></legend><bdo id='L95Qq'><pre id='L95Qq'><center id='L95Qq'></center></pre></bdo></b><th id='L95Qq'></th></span></q></dt></tr></i><div id='L95Qq'><tfoot id='L95Qq'></tfoot><dl id='L95Qq'><fieldset id='L95Qq'></fieldset></dl></div>
    • <bdo id='L95Qq'></bdo><ul id='L95Qq'></ul>

    <tfoot id='L95Qq'></tfoot>

        <legend id='L95Qq'><style id='L95Qq'><dir id='L95Qq'><q id='L95Qq'></q></dir></style></legend>

        新的 parse.com php API - currentUser 不回馈用户

        New parse.com php API - currentUser not giving back a user(新的 parse.com php API - currentUser 不回馈用户)

              <i id='6yERL'><tr id='6yERL'><dt id='6yERL'><q id='6yERL'><span id='6yERL'><b id='6yERL'><form id='6yERL'><ins id='6yERL'></ins><ul id='6yERL'></ul><sub id='6yERL'></sub></form><legend id='6yERL'></legend><bdo id='6yERL'><pre id='6yERL'><center id='6yERL'></center></pre></bdo></b><th id='6yERL'></th></span></q></dt></tr></i><div id='6yERL'><tfoot id='6yERL'></tfoot><dl id='6yERL'><fieldset id='6yERL'></fieldset></dl></div>
              <tfoot id='6yERL'></tfoot>
                <tbody id='6yERL'></tbody>

              • <bdo id='6yERL'></bdo><ul id='6yERL'></ul>

                <small id='6yERL'></small><noframes id='6yERL'>

                <legend id='6yERL'><style id='6yERL'><dir id='6yERL'><q id='6yERL'></q></dir></style></legend>
                • 本文介绍了新的 parse.com php API - currentUser 不回馈用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我可以使用用户凭据登录

                  I am able to login with user credentials with

                  try {
                    $user = ParseUser::logIn("myname", "mypass");
                    // Do stuff after successful login.
                  } catch (ParseException $error) {
                    // The login failed. Check error to see why.
                  }
                  

                  但是如果我之后尝试使用

                  but if I try to get the currentUser afterwards with

                  $currentUser = ParseUser::getCurrentUser();
                  if ($currentUser) {
                      // do stuff with the user
                  } else {
                      // show the signup or login page
                  }
                  

                  $currentUser 未设置.

                  $currentUser is not set.

                  我怀疑这更多是我不知道的 php问题".只要我不注销,我很高兴能在我的代码中保留 currentUser 的任何提示.

                  I suspect this more to be a php "issue" that I don't know. I am greatful for any hint for keeping currentUser retained in my code as long I do not log out.

                  推荐答案

                  为了让 getCurrentUser() 方法起作用,您必须定义要使用的会话存储类型.您可以使用 ParseSessionStorage 类来实现这一点:

                  In order for the getCurrentUser() method to work, you must define the type of session storage to use. You can use the ParseSessionStorage class to achieve this:

                  use ParseParseClient;
                  use ParseParseUser;
                  use ParseParseSessionStorage;
                  
                  session_start();
                  
                  // Init parse: app_id, rest_key, master_key
                  ParseClient::initialize('xxx', 'yyy', 'zzz');
                  
                  // set session storage
                  ParseClient::setStorage( new ParseSessionStorage() );
                  
                  try {
                    $user = ParseUser::logIn("myname", "mypass");
                    // Do stuff after successful login.
                  } catch (ParseException $error) {
                    // The login failed. Check error to see why.
                  }
                  
                  $currentUser = ParseUser::getCurrentUser();
                  
                  print_r( $currentUser );
                  

                  这篇关于新的 parse.com php API - currentUser 不回馈用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                      <tbody id='y7HLn'></tbody>

                    • <bdo id='y7HLn'></bdo><ul id='y7HLn'></ul>
                        <legend id='y7HLn'><style id='y7HLn'><dir id='y7HLn'><q id='y7HLn'></q></dir></style></legend>

                        1. <i id='y7HLn'><tr id='y7HLn'><dt id='y7HLn'><q id='y7HLn'><span id='y7HLn'><b id='y7HLn'><form id='y7HLn'><ins id='y7HLn'></ins><ul id='y7HLn'></ul><sub id='y7HLn'></sub></form><legend id='y7HLn'></legend><bdo id='y7HLn'><pre id='y7HLn'><center id='y7HLn'></center></pre></bdo></b><th id='y7HLn'></th></span></q></dt></tr></i><div id='y7HLn'><tfoot id='y7HLn'></tfoot><dl id='y7HLn'><fieldset id='y7HLn'></fieldset></dl></div>
                          <tfoot id='y7HLn'></tfoot>
                        2. <small id='y7HLn'></small><noframes id='y7HLn'>