Advertisement
wingman007

README.md_Example

Nov 17th, 2014
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. CsnUser
  2. =======
  3. Zend Framework 2 Module
  4.  
  5. ### What is CsnUser? ###
  6.  
  7. CsnUser is a Module for Authentication based on DoctrineORMModule
  8.  
  9. ### What exactly does CsnUser do? ###
  10.  
  11. CsnUser has been created with educational purposes to demonstrate how Authentication can be done. It is fully functional.
  12.  
  13. CsnUser module consists of:
  14.  
  15. * Login with remember me
  16. * Registration with Captcha and Confirmation email
  17. * Forgotten password with confirmation email.
  18.  
  19. In addition, passwords are encrypted using Bcrypt algorithm.
  20.  
  21. ### What's the use again? ###
  22.  
  23. An alternative to ZfcUser with more functionality added.
  24.  
  25. Installation
  26. ------------
  27. 1. Installation via composer is supported, simply run: `php composer.phar require coolcsn/csn-user:dev-master`. The installed module is located in *./vendor/coolcsn/csn-user*.
  28.  
  29. 2. Create Doctrine Proxy cache directory in APP_ROOT/data/DoctrineORMModule/Proxy. Be shure to grant write permissions.
  30.  
  31. 3. Add `CsnUser`, `DoctrineModule` and `DoctrineORMModule` in your application configuration at: `./config/application.config.php`. An example configuration may look like the following :
  32.  
  33. ```
  34. 'modules' => array(
  35. 'Application',
  36. 'DoctrineModule',
  37. 'DoctrineORMModule',
  38. 'CsnUser'
  39. )
  40. ```
  41.  
  42. Configuration
  43. -------------
  44. CsnUser requires setting up a Connection for Doctrine, a simple Mail configuration and importing a database schema.
  45.  
  46. 1. Create a new database (or use an existing one, dedicated to your application).
  47.  
  48. 2. Copy the sample Doctrine configuration from `./vendor/coolcsn/csn-user/config/doctrineorm.local.php.dist` to `./config/autoload` renaming it to **doctrineorm.local.php**. Edit the file, replacing the values (*username*, *password*, etc) with your personal database parameters.
  49.  
  50. 3. Run `./vendor/bin/doctrine-module orm:schema-tool:create` to generate the database schema. Import the sample SQL data (for some default data) located in `./vendor/coolcsn/CsnUser/data/SampleData.sql`. You can easily do that with *PhpMyAdmin* for instance.
  51.  
  52. 4. Copy the sample Mail configuration from `./vendor/coolcsn/csn-user/config/mail.config.local.php.dist` to `./config/autoload` renaming it to **mail.config.local.php**. Edit the file, replacing the values (*host*, *username*, etc) with your SMTP server parameters.
  53.  
  54. 5. Append the contents of `./vendor/coolcsn/CsnUser/data/CsnUser.css` to APP_ROOT/public/css/styles.css or include `CsnUser.css` into your app.
  55.  
  56. Options
  57. -------
  58.  
  59. The CsnUser module has some options to allow you to quickly customize the basic
  60. functionality. After installing CsnUser, copy
  61. `./vendor/coolcsn/CsnUser/config/csnuser.global.php.dist` to
  62. `./config/autoload`, renaming it to **csnuser.global.php** and change the values as desired, following the instructions.
  63.  
  64. The following options are available:
  65.  
  66. - **login_redirect_route** String value, name of a route in the application
  67. which the user will be redirected to after a successful login.
  68. - **logout_redirect_route** String value, name of a route in the application which
  69. the user will be redirected to after logging out.
  70. - **sender_email_adress** String value, email address to set From field of generated
  71. emails from module
  72. - **nav_menu** Bool value, show or hide navigation menu.
  73. - **captcha_char_num** Integer Value, number of captcha characters to display.
  74. - **display_exceptions** Boolean true/false value, set this to true to view possible
  75. exceptions details. If you are in production, then set it to false so exceptions get
  76. less verbose.
  77.  
  78. >### It is ready? ###
  79. Navigate to *[hostname]/user* in your browser to view different options for login, registration, forgotten password, etc.
  80.  
  81. Routes
  82. ------------
  83. The following routes are available:
  84.  
  85. - **user** Welcome view.
  86. - **user/login** User login view.
  87. - **user/register** User register view.
  88. - **user/register/reset-password** User resep password view.
  89. - **user/register/edit-profile** User edit profile view.
  90. - **user/register/change-password** User change password view.
  91. - **user/register/change-email** User change email view.
  92. - **user/register/change-security-question** User change security question view.
  93. - **user/admin** Users admin view.
  94. - **user/admin/create** User admin create view.
  95.  
  96. Dependencies
  97. ------------
  98.  
  99. This Module depends on the following Modules:
  100.  
  101. - [Zend Framework 2](https://github.com/zendframework/zf2)
  102.  
  103. - [DoctrineORMModule] (https://github.com/doctrine/DoctrineORMModule) - DoctrineORMModule integrates Doctrine 2 ORM with Zend Framework 2 quickly and easily.
  104.  
  105. Recommends
  106. ----------
  107. - [coolcsn/CsnAuthorization](https://github.com/coolcsn/CsnAuthorization) - Authorization compatible for this Registration and Logging.
  108.  
  109. - [coolcsn/CsnNavigation](https://github.com/coolcsn/CsnNavigation) - Navigation module;
  110.  
  111. - [coolcsn/CsnCms](https://github.com/coolcsn/CsnCms) - Content management system;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement