Hello Fahad, how are you? well, im just gona hand it to you, im going suicidal at an issue that im having with my custom login. The thing is, I've integrated the Facebook plugin on croogo 1.4.4, from https://github.com/webtechnick/CakePHP-Facebook-Plugin. The only reason that im not using this plugin's register is because i want to manage the login myself. their code is quite buggy, im only using it for the API which offers for Facebook PHP api.
Anyhoo, so i've created an action called *fblogin()* apart from the simple user login(). this is because i want my users to register manually in case they do not have facebook accounts; therefore, i would want to manage the Auth myself. So, below is my public function *fblogin() * > *public function fblogin(){* > *//actions to grab facebook response after fb.login() button is pressed* > > //first i create a new user > $this->User->create(); > $new_user = array(); > > $new_user['User']['username'] = "test1"; > $new_user['User']['password'] = "password123"; > > //...*assign the rest of the necessary fields (email, phone, website, > etc...) > > *if($this->User->save($new_user)){ > $this->Session->setFlash(__('Your account was successfully created.'), > 'default', array('class' => 'success')); > $login_auth = array('username'=>$new_user['User']['facebook_id'], > 'password'=>$new_user['User']['password']); > > $this->Auth->authenticate = array( > 'Form' => array( > 'fields' => array('username' => 'username', > 'password' => $this->modelFields['password']) > ) > ); > > if ($this->Auth->login($login_auth)) { > $this->Session->setFlash(__('You are now logged in > as '.$full_name.' - '.$new_user['User']['password']), 'default', > array('class' => 'success')); > > return $this->redirect('/'); > } > } > > *} * > Below is the error that I receive: *Notice* (8): Undefined index: id [*CORE/Cake/Model/AclNode.php*, line *140*] > > AclNode::node() - Couldn't find Aro node identified by "Array ( [Aro0.model] > => User [Aro0.foreign_key] => ) " > > *Error: * An Internal Error Has Occurred. > I'm gona cry!... :'( - I might be standing in the wrong corner as I'm pretty sure that it's a CakePHP issue, and not a Croogo. is there something else that im missing? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.