Download the PHP package yii1tech/web-user without Composer

On this page you can find all versions of the php package yii1tech/web-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 web-user

Advanced web user component for Yii 1


This extension provides advanced web user component for Yii 1.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads 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.

Usage

This extension provides advanced version of the standard CWebUser component for Yii 1. Class yii1tech\web\user\WebUser adds ability for setup external handlers for the authentication flow events. Following events are available:

Application configuration example:

The most notable of all introduced events is 'onAfterRestore'. By default, Yii does not re-check user's identity availability on each subsequent request. Once user logs in, he stays authenticated, even if related record at "users" table is deleted. You can use 'onAfterRestore' event to ensure deleted or banned users will lose access to your application right away. For example:

Operating ActiveRecord model via WebUser

This package also provides yii1tech\web\user\ActiveRecordModelBehavior behavior for the yii1tech\web\user\WebUser, which allows operating ActiveRecord model at the WebUser component level.

Application configuration example:

Inside you program you can always access currently authenticated user's model via "user" application component. For example:

In case there is no authenticated user yii1tech\web\user\ActiveRecordModelBehavior::getModel() returns null. For example:

By default yii1tech\web\user\ActiveRecordModelBehavior automatically logs out any authenticated user, if it is unable to get his related record from database. You may control this behavior via yii1tech\web\user\ActiveRecordModelBehavior::$autoSyncModel.

You may add extra condition for the user search query via yii1tech\web\user\ActiveRecordModelBehavior::$modelFindCriteria. This allows you to handle such things as user's ban or account confirmation. For example:

You may use yii1tech\web\user\ActiveRecordModelBehavior::setModel() method to switch user identity. For example:

Note: while method yii1tech\web\user\ActiveRecordModelBehavior::setModel() can be used for user identity switching, it is not equal to \CWebUser::login() or \CWebUser::changeIdentity(), since it does not handle related Cookies and some other related features.

You may use yii1tech\web\user\ActiveRecordModelBehavior::setModel() in junction with "yii1tech/session-dummy" to easily create authentication flow for API. For example:


All versions of web-user with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
yiisoft/yii Version ~1.1.3
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 yii1tech/web-user contains the following files

Loading the files please wait ....