Download the PHP package yii2mod/yii2-user without Composer

On this page you can find all versions of the php package yii2mod/yii2-user. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-user

Yii2 User Extension


Flexible user registration and authentication module for Yii2

Latest Stable Version Total Downloads License Scrutinizer Code Quality Build Status

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Actions

This extension provides several independent action classes, which provides particular operation support:

  1. [[yii2mod\user\actions\LoginAction]] - Logs in a user. The following additional parameters are available:
    • view - name of the view, which should be rendered.
    • modelClass - login model class name.
    • layout - the name of the layout to be applied to this view.
    • returnUrl - url which user should be redirected to on success.
  2. [[yii2mod\user\actions\LogoutAction]] - Logs out the current user. The following additional parameters are available:
    • returnUrl - url which user should be redirected to on success.
  3. [[yii2mod\user\actions\SignupAction]] - Signup a user. The following additional parameters are available:
    • view - name of the view, which should be rendered.
    • modelClass - signup model class name.
    • returnUrl - url which user should be redirected to on success.
  4. [[yii2mod\user\actions\RequestPasswordResetAction]] - Request password reset for a user. The following additional parameters are available:
    • view - name of the view, which should be rendered.
    • modelClass - request password model class.
    • successMessage - message to the user when the mail is sent successfully.
    • errorMessage - error message for the user when the email was not sent.
    • returnUrl - url which user should be redirected to on success.
  5. [[yii2mod\user\actions\PasswordResetAction]] - Reset password for a user. The following additional parameters are available:
    • view - name of the view, which should be rendered.
    • modelClass - reset password model class.
    • successMessage - message to be set on success.
    • returnUrl - url which user should be redirected to on success.

Configuration

1) If you use this extension without base template, then you need execute migration by the following command:

2) You need to configure the params section in your project configuration:

3) Your need to create the UserModel class that be extends of UserModel and configure the property identityClass for user component in your project configuration, for example:

4) For sending emails you need to configure the mailer component in the configuration of your project.

5) If you don't have the passwordResetToken.php template file in the mail folder of your project, then you need to create it, for example:

This template used for password reset email.

6) Add to SiteController (or configure via $route param in urlManager):

You can then access to this actions through the following URL:

  1. http://localhost/site/login
  2. http://localhost/site/logout
  3. http://localhost/site/signup
  4. http://localhost/site/request-password-reset
  5. http://localhost/site/password-reset

7) Also some actions send flash messages, so you should use an AlertWidget to render flash messages on your site.

Using action events

You may use the following events:

Console commands

Setup

To enable console commands, you need to add module into console config of you app. /config/console.php in yii2-app-basic template, or /console/config/main.php in yii2-app-advanced.

Available console actions

Internationalization

All text and messages introduced in this extension are translatable under category 'yii2mod.user'. You may use translations provided within this extension, using following application configuration:

Support us

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.


All versions of yii2-user with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
yiisoft/yii2 Version >=2.0.8
yiisoft/yii2-swiftmailer Version *
yii2mod/yii2-enum Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yii2mod/yii2-user contains the following files

Loading the files please wait ....