Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook registration problum #143

Open
srinathm opened this issue Aug 20, 2013 · 1 comment
Open

Facebook registration problum #143

srinathm opened this issue Aug 20, 2013 · 1 comment

Comments

@srinathm
Copy link

Hello every one, i have registration problum please anyone help to me

in my appcontroller
public $components = array(
'Session',
'Auth' => array(
//'authenticate' => array(
'Form' => array(
'fields' => array('username' => 'email')
),
'loginRedirect' => array('controller' => 'users', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'users', 'action' => 'login'),
'authorize' => array('Controller')
//)
),
'Facebook.Connect' => array('model' => 'User')
);

public function beforeFilter() {

    $this->Auth->allow('index', 'view');
}

public function isAuthorized($user) {
// Admin can access every action
if (isset($user['role']) && $user['role'] === 'admin') {
return true;
}

  // Default deny
  return false;

}

in my userscontroller

function beforeFilter() {
Security::setHash('md5');
$this->Auth->allow('add','createimage','registration');
//$this->Auth->loginRedirect = array('action' => 'index'); //3
//$this->Auth->loginRedirect = array('action' => 'index');
$this->layout='facebook'; //4
}

function beforeFacebookSave(){
$this->Connect->authUser['User']['email'] = $this->Connect->user('email');
return true; //Must return true or will not save.

}

function logout() {                                 //7
    $this->Session->destroy();
    $this->redirect($this->Auth->logout());
}

public function registration(){

//echo "sdfsdf"; exit;
//if($this->request->post){
//pr($this->request->data); exit;

  $this->layout='facebook';

//if($user = $this->Connect->registrationData()){
//We have a registered user, look at it and do something with it.
//print_r($user);
//}
}

after clicking Register button it gives registering for app dialog and when clicks continue
it redirecting to my redirect-uri but gives below error

Error: Database table app_models for model AppModel was not found.

give solution for this

thanks

@aaganja
Copy link

aaganja commented Nov 21, 2016

@srinathm did you find the solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants