Coder Social home page Coder Social logo

eugene-o-z / azineemailupdateconfirmationbundle-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azine/azineemailupdateconfirmationbundle

0.0 1.0 0.0 55 KB

Symfony bundle that adds the functionality to require a user to verify her changed email address with a link.

PHP 99.25% HTML 0.75%

azineemailupdateconfirmationbundle-1's Introduction

AzineEmailUpdateConfirmationBundle

Symfony bundle which allows to use functionality of email change confirmation based on FOSUserBundle.

Installation

To install AzineEmailUpdateConfirmationBundle with Composer just add the following to your composer.json file:

// composer.json
{
    // ...
    require: {
        // ...
        "azine/emailupdateconfirmation-bundle": "dev-master"
    }
}

Then, you can install the new dependencies by running Composer’s update command from the directory where your composer.json file is located:

php composer.phar require azine/emailupdateconfirmation-bundle

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

<?php

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Azine\EmailUpdateConfirmationBundle\AzineEmailUpdateConfirmationBundle(),
    // ...
);

Register the routes of the AzineEmailUpdateConfirmationBundle:

// in app/config/routing.yml

azine_email_update_confirmation_bundle:
    resource: "@AzineEmailUpdateConfirmationBundle/Resources/config/routing.yml"

Setup from_email parameter:

// in app/config/config.yml

azine_email_update_confirmation:
    from_email: [email protected]

Configuration options

This is the complete list of configuration options with their defaults.

//app/config/config.yml

# Default configuration for "AzineEmailUpdateConfirmationBundle"
azine_email_update_confirmation:

    # enable/disable email update confirmation functionality. default = true
    enabled:              true

    # determines the encryption mode for encryption of email value. openssl_get_cipher_methods(false) is default value
    cypher_method:        null

    # mailer service to be used
    mailer:               azine.email_update.mailer

    # email template
    email_template:       '@AzineEmailUpdateConfirmation/Email/email_update_confirmation.txt.twig'

    # `from`-address for the email. If not set, `fos_user.resetting.email.from_email` will be used
    from_email:           ~

    # `from`-name for the email. If not set, `fos_user.resetting.email.from_email` will be used
    from_name:            ~

    # route to redirect to, after the update confirmation
    redirect_route:       fos_user_profile_show

Contribute

Contributions are very welcome. Please fork the repository and issue your pull-request against the master branch.

The PR should:

  • contain a description what the PR solves or adds to the bundle (reference existing issues if applicable)
  • contain clean code with some iniline documentation and phpdocs, no "pure whitespace" changes.
  • respect the Symfony best practices and coding style
  • have phpunit tests covering the new feature or fix
  • result in a 'green' build for your branch on travis-ci.org before you issue the PR

Code style

You can check the code style with the php-cs-fixer. Optionally you can set up a pre-commit hook which contains the php-cs-fixer check. Also see https://github.com/FriendsOfPHP/PHP-CS-Fixer

All you have to do is to move pre-commit.sample file from commit-hooks/ to .git/hooks/ folder and rename it to pre-commit.

php-cs-fixer will check the style of your new added code each time you commit and apply fixes to the commit.

To run php-cs-fixer manually, install dependencies (composer install) and execute php vendor/friendsofphp/php-cs-fixer/php-cs-fixer --diff --dry-run -v fix --config=.php_cs.dist .

Build-Status ec.

Build Status Total Downloads Latest Stable Version Scrutinizer Quality Score Code Coverage

azineemailupdateconfirmationbundle-1's People

Contributors

eugene-o-z avatar azine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.