php - set current model to database object in cakephp -


how set model database object in efficient way? better way below?

    $user = $this->user->findbypassword($password, array('fields'=>'id'));     $this->user = new user($user["user"]["id"]);     $this->user->read();     print_r($this->user); 

i've looked everywhere can't find it.

you mean:

$user = $this->user->findbypassword($password, array('fields'=>'id')); $this->user->id = $user["user"]["id"]; //set id print_r($this->user); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -