/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/docs/en
NameSizeModeActions
authentication-component.rst39750644editdlrm
authenticators.rst206610644editdlrm
conf.py2610644editdlrm
contents.rst3290644editdlrm
identifiers.rst65500644editdlrm
identity-object.rst33580644editdlrm
impersonation.rst22160644editdlrm
index.rst88770644editdlrm
middleware.rst26330644editdlrm
migration-from-the-authcomponent.rst113610644editdlrm
password-hashers.rst27040644editdlrm
testing.rst17990644editdlrm
url-checkers.rst10400644editdlrm
view-helper.rst7310644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/authentication/docs/en/view-helper.rst (731B)
View Helper =========== In your AppView, load the Helper as:: $this->loadHelper('Authentication.Identity'); For very simple checking whether the user is logged in you can use:: if ($this->Identity->isLoggedIn()) { ... } Getting user data can be done with:: $username = $this->Identity->get('username'); The following check can be used to tell if a record that belongs to some user is the current logged in user and compare other fields as well:: $isCurrentUser = $this->Identity->is($user->id); $isCurrentRole = $this->Identity->is($user->role_id, 'role_id'); This method is mostly a convenience method for simple cases and not intended to replace any kind of proper authorization implementation.