When I try to log in, I get this error; however, if I back out, it did successfully log me in, it just wont redirect me or whatever. Im new to yii and php, so please dont expect I will understand a complicated answer lol… Thank you for your help in advance… Just trying to move along.
CException
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
{
102 $form->attributes=$_POST[‘LoginForm’];
103 // validate user input and redirect to previous page if valid
[color="#483D8B"]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.