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

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

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

        如何从 sfUser 中获取 id?

        How to catch an id from sfUser?(如何从 sfUser 中获取 id?)

          <tfoot id='IHeMw'></tfoot>

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

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

                  本文介绍了如何从 sfUser 中获取 id?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 symfony 1.4 &我使用 sfDoctrineGuardPlugin 作为身份验证工具.

                  I'm working with symfony 1.4 & i use sfDoctrineGuardPlugin as a tool for authentifications.

                  我想获取用户的 ID 以便将其存储在我的表中.

                  I want to catch the Id of user in order te store it in my table.

                  经过一个小的研究,我想我必须使用那个表达式:getUser()->getGuardUser()->getId().

                  After a small research, I guess I have to use that expression : getUser()->getGuardUser()->getId().

                  我正在寻找的是如何为我的目标投资该表达.

                  What i looking for is how to invest that expression for my target.

                  推荐答案

                  如果用户通过了身份验证,是的,你可以使用:

                  if the user is authenticated, yes, you can use:

                  // inside an action
                  $id = $this->getUser()->getGuardUser()->getId();
                  
                  // inside a template
                  $id = $sf_user->getGuardUser()->getId();
                  

                  如果用户未通过身份验证,则会抛出错误.

                  If the user is not authenticated, it'll throw an error.

                  这篇关于如何从 sfUser 中获取 id?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)
                • <tfoot id='Bf7nd'></tfoot>

                    <bdo id='Bf7nd'></bdo><ul id='Bf7nd'></ul>

                    <small id='Bf7nd'></small><noframes id='Bf7nd'>

                      <tbody id='Bf7nd'></tbody>

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