2017 © Pedro Peláez
 

yii2-extension yii2-oracle-login

Login using oracle database usename

image

apaoww/yii2-oracle-login

Login using oracle database usename

  • Thursday, March 17, 2016
  • by apaoww
  • Repository
  • 1 Watchers
  • 0 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Yii 2 Oracle Login

Login using oracle database usename, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist apaoww/yii2-oracle-login "dev-master"

or add, (*4)

"apaoww/yii2-oracle-login": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

 'oracle_id_username', "password" => "password",
                "dsn" => '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=xe)))']); ?>

This could be use on Login model to validate the password for example:, (*7)

public function validatePassword($attribute, $params)
    {
        $dsn = $this->getDsn();
        if (!$this->hasErrors()) {
            $oracle = OracleLogin::widget(["username" => $this->username, "password" => $this->password,
                "dsn" => $dsn['tns']]);
            if(!$oracle){
                $this->addError($attribute, 'Incorrect username or password.');
            }

        }
    }

The Versions

17/03 2016

dev-master

9999999-dev

Login using oracle database usename

  Sources   Download

Apache-2.0

The Requires

 

extension yii2