PHP warning

Declaration of user::findByAttributes($attribs) should be compatible with CActiveRecord::findByAttributes($attributes, $condition = '', $params = Array)

/home/ul528zplykxs/domains/etc-marketplace.ryanfosterdesign.net/html/protected/models/User.php(3)

01 <?php
02 
03 class user extends CActiveRecord {
04 
05     public static function model($className=__CLASS__) {
06         return parent::model($className);
07     }
08 
09     public function findByAttributes($attribs) {
10 
11         $key = key($attribs);
12         $val = $attribs[$key];
13 
14         $record = Yii::app()->db->createCommand("SELECT u.*, ug.user_group FROM user AS u LEFT JOIN user_group AS ug ON ug.user_group_id=u.user_group_id WHERE $key='$val'")->query();
15 

Stack Trace

#2
+
 /home/ul528zplykxs/domains/etc-marketplace.ryanfosterdesign.net/html/protected/controllers/SiteController.php(130): spl_autoload_call("User")
125             $this->layout = 'basic';
126             $this->pageTitle = 'ETC Marketplace - Create New Account';
127 
128             $error = '';
129             $attribs = array('username'=>'', 'email'=>'', 'store'=>'');
130             $model = new User;
131 
132             if (isset($_POST['Register'])) {
133                 $attribs = $_POST['Register'];
134                 $valid = $model->validate($attribs);
135 
#10
+
 /home/ul528zplykxs/domains/etc-marketplace.ryanfosterdesign.net/html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 05:28:55 Apache Yii Framework/1.1.13