/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/docs/ja
NameSizeModeActions
authentication-component.rst49500644editdlrm
authenticators.rst176620644editdlrm
conf.py2610644editdlrm
contents.rst3100644editdlrm
identifiers.rst74090644editdlrm
identity-object.rst40480644editdlrm
index.rst76690644editdlrm
middleware.rst29700644editdlrm
migration-from-the-authcomponent.rst128900644editdlrm
password-hashers.rst35740644editdlrm
testing.rst17680644editdlrm
url-checkers.rst14030644editdlrm
view-helper.rst9340644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/docs/ja/view-helper.rst (934B)
View Helper =========== AppViewでヘルパーを次のようにロードします。:: $this->loadHelper('Authentication.Identity'); ユーザーがログインしているかどうかを非常に簡単に確認するには:: if ($this->Identity->isLoggedIn()) { ... } ユーザーデータの取得は:: $username = $this->Identity->get('username'); 次のチェックは、あるユーザーに属するレコードが現在ログインしているユーザーであるかどうかを判断し、 他のフィールドを比較するために使用することができます。:: $isCurrentUser = $this->Identity->is($user->id); $isCurrentRole = $this->Identity->is($user->role_id, 'role_id'); このメソッドは主に単純なケースのための便利なメソッドであり、いかなる種類の適切な認可実装を置き換えることを意図したものではありません。