ribafs/login

This plugin have a component with login() and logout() actions and a login element to use in your layout of CakePHP 3


Keywords
plugin, cakephp, login, component, logout, element
License
MIT

Documentation

Login Plugin

This component offer the methods login() and logout(), element login.ctp and two layouts (admin and default) with this element to your CakePHP 3 application

URL

This project - https://github.com/ribafs/cakephp-login

Background

This plugin creates the actions login() and logout(), an element login.ctp with login and logout and two layouts with this element. In addition it brings a sample database and an AppController.php

I created this plugin to make my work with CakePHP applications more productive, to facilitate the creation.

Requeriments

  • PHP 7.x
  • CakePHP 3.5

Warning

This plugin is intended for use with applications that implement the auth component

Features

  • Plugin (CakephpLogin)
  • Component (Login)
  • Element (login.ctp)
  • Two layouts (admin.ctp and defaultp.ctp)
  • db.sql (users and roles)
  • AppController.php

How to install using composer

composer require ribafs/cakephp-login

How to use this plugin

  • Enable Plugin
bin/cake plugin load CakephpLogin
  • Add to your src/Controller/AppController.php:

On initialize() method add:

$this->loadComponent('CakephpLogin.Login');

Code Suggestion

In root plugin exists a AppController.php as suggestion to you. Also exists a db.sql with two tables, roles and users.

Suggestions

Suggestions, forks, issues, pull requests are welcome

License

MIT License

Copyright (c) 2019 Ribamar Sousa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.