Help Request (Check Black text Please)

[color="#FF0000"]CException[/color]

[color="#C0C0C0"]

LoginForm and its behaviors do not have a method or closure named "login".

/var/www/yii/framework/base/CComponent.php(266)

254 public function __call($name,$parameters)

255 {

256 if($this->_m!==null)

257 {

258 foreach($this->_m as $object)

259 {

260 if($object->getEnabled() && method_exists($object,$name))

261 return call_user_func_array(array($object,$name),$parameters);

262 }

263 }

264 if(class_exists(‘Closure’, false) && $this->canGetProperty($name) && $this->$name instanceof Closure)

265 return call_user_func_array($this->$name, $parameters);

266 throw new CException(Yii::t(‘yii’,’{class} and its behaviors do not have a method or closure named “{name}”.’,

267 array(’{class}’=>get_class($this), ‘{name}’=>$name)));

268 }

269

270 /**

271 * Returns the named behavior object.

272 * The name ‘asa’ stands for ‘as a’.

273 * @param string $behavior the behavior name

274 * @return IBehavior the behavior object, or null if the behavior does not exist

275 */

276 public function asa($behavior)

277 {

278 return isset($this->_m[$behavior]) ? $this->_m[$behavior] : null;

Stack Trace

#0

– /var/www/gRaiders/protected/controllers/SiteController.php(104): CComponent->__call("login", array())

099 if(isset($_POST[‘LoginForm’]))

100 [/color]

[color="#000000"] {

102 $form->attributes=$_POST[‘LoginForm’];

103 // validate user input and redirect to previous page if valid

104 if($form->validate() && $form->login()) $form->redirect(Yii::app()->user->returnUrl);

105 }

106 //display the login form

107 :( $this->render(‘login’,array(‘form’=>$form));

108 }[/color]

When I try to login, I get this error; however, I can back out and it DOES log me in… it just doesn’t redirect me successfully. Thank you in advance for your help. I appreciate it.

where does it go?

Please do not create multiple topics with the same problem…

The other one is here - http://www.yiiframework.com/forum/index.php/topic/30351-

Closing this one.