CDbException

CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 no such table: AuthAssignment. The SQL statement executed was: SELECT *
FROM 'AuthAssignment'
WHERE userid=:userid

/home/andre/lamp/apache2/htdocs/site/framework/db/CDbCommand.php(516)

504             return $result;
505         }
506         catch(Exception $e)
507         {
508             if($this->_connection->enableProfiling)
509                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
510             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
511             $message = $e->getMessage();
512             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
513                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
514             if(YII_DEBUG)
515                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
516             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
517                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
518         }
519     }
520 
521     /**
522      * Builds a SQL SELECT statement from the given query specification.
523      * @param array $query the query specification in name-value pairs. The following
524      * query options are supported: {@link select}, {@link distinct}, {@link from},
525      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
526      * {@link limit}, {@link offset} and {@link union}.
527      * @return string the SQL statement
528      * @since 1.1.6

Stack Trace

#2
+
 /home/andre/lamp/apache2/htdocs/site/test/protected/modules/rights/components/RAuthorizer.php(341): CDbAuthManager->getAuthAssignments("admin")
336     * @param integer $userId the id of the user to do the check for.
337     * @return boolean whether the user is a superuser.
338     */
339     public function isSuperuser($userId)
340     {
341         $assignments = $this->_authManager->getAuthAssignments($userId);
342         return isset($assignments[ $this->superuserName ]);
343     }
344 
345     /**
346     * Returns the permissions for a specific authorization item.
#3
+
 /home/andre/lamp/apache2/htdocs/site/test/protected/modules/rights/components/RWebUser.php(21): RAuthorizer->isSuperuser("admin")
16     public function afterLogin($fromCookie)
17     {
18         parent::afterLogin($fromCookie);
19 
20         // Mark the user as a superuser if necessary.
21         if( Rights::getAuthorizer()->isSuperuser($this->getId())===true )
22             $this->isSuperuser = true;
23     }
24 
25     /**
26     * Performs access check for this user.
#5
+
 /home/andre/lamp/apache2/htdocs/site/test/protected/models/LoginForm.php(71): CWebUser->login(UserIdentity, 0)
66             $this->_identity->authenticate();
67         }
68         if($this->_identity->errorCode===UserIdentity::ERROR_NONE)
69         {
70             $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
71             Yii::app()->user->login($this->_identity,$duration);
72             return true;
73         }
74         else
75             return false;
76     }
2011-07-10 20:08:35 Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.2.17 Yii Framework/1.1.8