/** * Behaviors associated with this ActiveRecord. * * We are using the APasswordBehavior because it allows neat things * like changing the password hashing methods without rebuilding the whole user database. * * @see https://github.com/phpnode/YiiPassword * * @return array Configuration for the behavior classes. */ public function behaviors() { Yii::import('common.extensions.behaviors.password.*'); return array_merge(parent::behaviors(), array("APasswordBehavior" => array("class" => "APasswordBehavior", "defaultStrategyName" => "bcrypt", "strategies" => array("bcrypt" => array("class" => "ABcryptPasswordStrategy", "workFactor" => 14, "minLength" => 8))))); }
public function behaviors() { return array_merge(parent::behaviors(), array('CCompare')); }