プラグイン > バグ報告・利用に関する質問 > Impossible to access an attribute ("name01") on a string variable ("anon.").について |
バグ報告・利用に関する質問
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
umebius |
投稿日時: 2019/3/23 23:32
対応状況: −−−
|
神 登録日: 2016/7/22 居住地: 投稿: 2085 |
Re: Impossible to access an attribute ("name01") on a string variable ("anon.").について ログインしているかの判定が必要なので
{% if app.user.name01 != '' %}を下記に変更する必要があります。 {% if is_granted('ROLE_USER') and app.user.name01 != '' %} app.user.name01 が空文字の可能性がないのであれば {% if is_granted('ROLE_USER') %}だけで十分かもしれません。
|
フラット表示 | 前のトピック | 次のトピック |