Exemplo n.º 1
0
 public function create($uuid, $email)
 {
     $statement = $this->db->prepare('INSERT INTO USER (token, token_time, email)
                             VALUES (:token, :token_time, :email)');
     $statement->bindValue(":token", $uuid);
     $statement->bindValue(":token_time", date('Y-m-d H:i:s', time()));
     $statement->bindValue(":email", $email);
     $count = $statement->execute();
     $user_id = $this->db->lastInsertId();
     $tag = new Tag($this->db, $user_id);
     $tag->create_default();
     $tag_id = $tag->by_name('flat');
     $trick = new Trick($this->db, $user_id);
     $trick->create_default($tag_id);
 }