Dataset Viewer
Auto-converted to Parquet
query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
b3e60fb14c1060b79aea096060e52184
Returns the static model of the specified AR class.
[ { "docid": "42b5c838d92fc6430769ae648eea0d9e", "score": "0.0", "text": "public static function model($className=__CLASS__){\n\t\treturn parent::model($className);\n\t}", "title": "" } ]
[ { "docid": "b0057b95cf2481a9838c948c81d83bc7", "score": "0.72562826", "text": "public function as(string $class): Model\n {\n return $class::findOrFail($this->getKey());\n }", "title": "" }, { "docid": "073363dc113f71889d87b7e22db515e1", "score": "0.7241839", "text": "public function staticModel($className = null)\n {\n if ($className === null)\n $className = $this->getModelClass();\n return $className::model();\n }", "title": "" }, { "docid": "03550cdf4d4434979cff4de0fb834013", "score": "0.7154113", "text": "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "title": "" }, { "docid": "03550cdf4d4434979cff4de0fb834013", "score": "0.7154113", "text": "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "title": "" }, { "docid": "97a0c2c570c1cd72cfd65507881b5674", "score": "0.70629025", "text": "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "65a07ac39d2e71b95725b81fbb33da3d", "score": "0.69277567", "text": "public static function make():Model{\n return Application::getInstance()->container()->get(get_called_class());\n }", "title": "" }, { "docid": "b374f75f119a4c0b5538ea3114acca9f", "score": "0.6925706", "text": "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "e8d97461baf90706bfe0a5e239de28d4", "score": "0.6910972", "text": "public static function model() {\n return new static();\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.6902751", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.6902751", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "6546adf8eef733a1d3ddb03561e229ad", "score": "0.6894916", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "c60374431eaedc4b94705be574083f6a", "score": "0.68948084", "text": "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" } ]
65e840c8f1b6d4da4d81597c187f6307
Get all data for a given id
[ { "docid": "352374bbfe0e280e8085d89e6f2b3bef", "score": "0.0", "text": "public static function getComment($id)\n {\n return (array)BackendModel::getContainer()->get('database')->getRecord('SELECT i.*, UNIX_TIMESTAMP(i.created_on) AS created_on,\n\t\t\t p.id AS product_id, p.title AS product_title, m.url AS product_url\n\t\t\t FROM catalog_comments AS i\n\t\t\t INNER JOIN catalog_products AS p ON i.product_id = p.id AND i.language = p.language\n\t\t\t INNER JOIN meta AS m ON p.meta_id = m.id\n\t\t\t WHERE i.id = ?\n\t\t\t LIMIT 1', array((int)$id));\n }", "title": "" } ]
[ { "docid": "2a056fd9dfc7d1c7371c289e24a3021f", "score": "0.8203524", "text": "public function getData($id=null)\n {\n if($id !== null) {\n return $this->model->find($id);\n }\n return $this->model::all();\n }", "title": "" }, { "docid": "15d41566ca726fc2d4674fad36548705", "score": "0.7956095", "text": "public function getData($id) {\n return $this->run('getData', array($id));\n }", "title": "" }, { "docid": "2659af7ba41ecd6292d3ef5a41419b89", "score": "0.7716624", "text": "public static function getData($id)\n\t{\n\t\treturn static::find($id);\n\t}", "title": "" }, { "docid": "841df0fb137f3b7d9c46b93b81489d8f", "score": "0.76267767", "text": "public static function fetchDataOnID($id)\n {\n\n $sql = \"SELECT * FROM dataset_contacts_3_Feuil1 WHERE id=\" . $id;\n return DB::select(DB::raw($sql));\n\n // return DB::table('dataset_contacts_3_Feuil1')->where('id',$id)->get();\n // return DB::select(DB::raw($sql));\n\n }", "title": "" }, { "docid": "fbbe15029ea99ffe47013d83565ed12f", "score": "0.7587981", "text": "public function get(int $id): array;", "title": "" }, { "docid": "4d2acc0d0c30d3e7a6bd4cff22288e7b", "score": "0.7587903", "text": "function getById($id){\n $this->db->where('id = ', $id);\n $query = $this->db->get($this->table);\n if($query->num_rows() > 0 ){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "c9f6712e88232656653993186c22021b", "score": "0.74799985", "text": "function findData($id)\n {\n $query = $this->createQueryBuilder('q')\n ->where('q.id = :id')\n ->setParameter('id', $id)\n ->getQuery();\n try {\n $result = $query->getArrayResult();\n } catch(NoResultException $e) {\n $result = null;\n }\n return $result;\n }", "title": "" }, { "docid": "02ccc1be4ec019025bb01dd1508f9ccc", "score": "0.74699175", "text": "public function readById($id){\n // query to select id specific data\n $sql = \"SELECT * FROM $this->table WHERE id=:id\";\n // prepare a database connection\n $stmt = $this->connect()->prepare($sql);\n // bind value to database column\n $stmt->bindParam(':id',$id);\n // execute the query\n $stmt->execute();\n // fetch all data\n $data = $stmt->fetch();\n // return all data\n return $data;\n }", "title": "" }, { "docid": "c0e2fb859036b799f49236587e63afa9", "score": "0.73749447", "text": "public function getDataById($id)\n {\n return $this->db->query(\"select *,cf_aturan.id as id_data,gejala.id as id_gjl, kerusakan.id as id_krskn FROM cf_aturan INNER JOIN gejala ON cf_aturan.id_gejala = gejala.id \n INNER JOIN kerusakan ON cf_aturan.id_kerusakan = kerusakan.id\n WHERE cf_aturan.id = '$id'\")->result();\n }", "title": "" }, { "docid": "91aaeca7d015f5d775782a671b402fc1", "score": "0.7260438", "text": "public function getAllByID($id){\r\n \r\n $db = new Database();\r\n \r\n $value = \"\r\n user_id,\r\n user_name,\r\n user_pass,\r\n user_right,\r\n user_active,\r\n user_firstname,\r\n user_address\r\n \";\r\n \r\n $condition = array(\r\n 'where' => 'user_active=1 AND user_id='.$id,\r\n 'order_by' => 'user_date_update DESC'\r\n );\r\n \r\n $result = $db->getSData('user',$value,$condition);\r\n \r\n return $result;\r\n }", "title": "" }, { "docid": "58ca356d8819616a727cbbe096e791f9", "score": "0.71654975", "text": "public function getByAll($id){\n \n $rezultat = Jela::has('sastojci')->has('kategorija')->whereHas('tag', function ($q) use ($id) {\n $q->where('tag_id', $id);\n })->paginate();\n return JelaResource::collection($rezultat);\n }", "title": "" }, { "docid": "b94b0486c4faeebcda862cca3016aedb", "score": "0.71518886", "text": "public function getUserData(int $id);", "title": "" }, { "docid": "9084d5eb27be18710b8eea2374c420e6", "score": "0.7131052", "text": "public function selectAllFromTableById($id = 'all'){\n\t $sql = 'SELECT * FROM `'.$this->tableName.'` WHERE `'.$this->tableName.'ID` = '.$id;\n\t \n\t if($id == 'all'){\n\t\t $sql = 'SELECT * FROM `'.$this->tableName.'`';\n\t }\n\t \n\t $result = $GLOBALS['mysql']->query($sql);\n\t \n\t\tif ($result->num_rows > 0) {\n\t\t\t$returnData = [];\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\tarray_push($returnData,$row);\n\t\t\t}\n\t\t\treturn $returnData;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "1fcc867819cb1d94f3f7989716f4eeae", "score": "0.70921135", "text": "public function listar($id = NULL){\n\t\t\t\t\tif(!empty($id)){\n\t\t\t\t\t\tif(is_numeric($id))\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->setId($id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where = \" WHERE id = \".$this->getId();\n\t\t\t\t\t\t\t$sql = \" SELECT * FROM \".$this->table.\"\".$where;\n\t\t\t\t\t\t\t$dados = $this->Query($sql,1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql = \"SELECT * FROM \".$this->table;\n\t\t\t\t\t\t$dados = $this->Query($sql,1);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\treturn $dados;\n\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "e98aec2e71625130116f2d4b142c007d", "score": "0.7061104", "text": "public function showAll($id)\n {\n $stmt = $this->conn->prepare(\"SELECT * FROM tickets WHERE ticketAssignedTo = :userId AND ticketStatus != 3\");\n $stmt->execute(array(\":userId\" => $id));\n\n $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n\n }", "title": "" }, { "docid": "6f11644cda360e6a2e531ba839ecc270", "score": "0.70461106", "text": "public function detail_data($id)\n {\n return $this->db->get_where('matapelajaran', ['id_matapelajaran' => $id])->row_array();\n }", "title": "" }, { "docid": "99f32f9ac350e2215a61854ae7c563ef", "score": "0.7031824", "text": "public function get_all_data_user_id($id){\n\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM penumpang WHERE id_penumpang = ?\");\n\t\t\t$stmt->bind_param(\"i\", $id);\n\t\t\tif ($stmt->execute())\n\t\t\t{\n\t\t\t\t$res = $stmt->get_result();\n\t\t\t\t$fetch = $res->fetch_assoc();\n\n\t\t\t\treturn $fetch;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6604c88345f8f3c3a75e7efab001f77e", "score": "0.70246094", "text": "public static function findWithData($id)\n\t{\n\t\treturn self::with(array('locality','society','category'))->find($id);\n\t}", "title": "" }, { "docid": "9ca44f89e8be5e39c8f986512b5b429d", "score": "0.7019103", "text": "function get_by_id($id)\n \t{\n \t\t$this->db->where($this->_table . 'Id', $id);\n\t\treturn $this->db->get($this->_prefix . $this->_table)->row_array();\n \t}", "title": "" }, { "docid": "9ca44f89e8be5e39c8f986512b5b429d", "score": "0.7019103", "text": "function get_by_id($id)\n \t{\n \t\t$this->db->where($this->_table . 'Id', $id);\n\t\treturn $this->db->get($this->_prefix . $this->_table)->row_array();\n \t}", "title": "" }, { "docid": "4884e25f6ec479d62507e3a70169ea79", "score": "0.70064485", "text": "private function getdata($id)\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * from metadata where id = $id\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres[0];\n }", "title": "" }, { "docid": "8a521c3f05d58aa0c3139cdbefaa11ee", "score": "0.70005804", "text": "public function fetchAllByPid(int $id): array;", "title": "" }, { "docid": "1debb05c7b76ff7082ffd56c1f666ef6", "score": "0.69919145", "text": "public function get( $id );", "title": "" }, { "docid": "1ecec0d51bf8bc9b92504c94e2ced55d", "score": "0.6987108", "text": "public function get($id)\n {\n }", "title": "" }, { "docid": "7a42bdf4c6f74bac22c8ec462e3f82da", "score": "0.6948997", "text": "public function getDataById($id)\n {\n $this->db->where('CONSECUTIVO', $id);\n return $this->db->get('Dep')->result();\n }", "title": "" }, { "docid": "45952f445543b52922dfb5930bd2c2af", "score": "0.69449407", "text": "public function get(string $id);", "title": "" }, { "docid": "45952f445543b52922dfb5930bd2c2af", "score": "0.69449407", "text": "public function get(string $id);", "title": "" }, { "docid": "4b3721a9da5b5c17e428972745d4f4d8", "score": "0.6943409", "text": "public function runData($id = -1){\n\t\treturn $this->_handler->getData($id);\n\t}", "title": "" }, { "docid": "cbf955b1f354f31e3e160fb617623bc8", "score": "0.69292593", "text": "public function get($id)\n {\n return $this->getAdapter()->get($id);\n }", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "89e533a13ce47e441056169b1fb4adde", "score": "0.69237036", "text": "public function find($id)\n {\n $query = $this->fpdo->from($this->table)->where(\"id\", $id);\n return $this->toArray($query);\n }", "title": "" }, { "docid": "7c70446e81758baba7972fcc6c212730", "score": "0.6909259", "text": "public function read($id);", "title": "" }, { "docid": "a3e06c306f73d7f546804710a264823f", "score": "0.6905593", "text": "public static function DataGetAll($id){//this function accepts and manages all users\n\t\t\t$table_friends = \"Friends_\".$id;\n\t\t\t$table_message = \"Messages_\".$id;\n\t\t\t$consult = \"SELECT P.id, P.name, \n\t\t\t\t\t\t\tP.last_name, \n\t\t\t\t\t\t\tF.status, \n\t\t\t\t\t\t\tF.date_friends,\n\t\t\t\t\t\t\t M.message, \n\t\t\t\t\t\t\t M.hour_sms,\n\t\t\t\t\t\t\t M.kind_message\n\t\t\t FROM PersonalInfo P\n\t\t\t LEFT JOIN $table_friends F ON F.Id = P.id\n\t\t\t LEFT JOIN $table_message M ON M.user = P.id\n\t\t\t AND M.Id = (SELECT MAX(M2.Id) FROM $table_message M2 WHERE M2.user = M.user)\";\n\n\t\t\t$result = Database::getInstance()->getDb()->prepare($consult);\n\n\t\t\t$result->execute();\n\n\t\t\t$list = $result->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\treturn $list;\n\n\t\t}", "title": "" }, { "docid": "de901d3b3a070815b7e01c990ad85faf", "score": "0.6881282", "text": "public function get($id)\n {\n $sql = \"SELECT * FROM {$this->table} WHERE id={$id}\";\n return $this->executeQuery($sql);\n }", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "1d0eb2bd7163689fd5877bed80e568ce", "score": "0.6831129", "text": "public function solicitudes($id)\n {\n $solicitudes = Solicitud::where('cargo_user_id', '=', $id)\n ->with('presupuesto')\n ->with('tipoHoras')\n\n // ->with('tipo_horas.nombre_hora')\n ->get();\n return ($solicitudes);\n }", "title": "" }, { "docid": "f6c3111a75526c917cd0b9cc3b863ae2", "score": "0.6830916", "text": "function find($id): array\n {\n return $this->findSingle();\n }", "title": "" }, { "docid": "4d51a71165127cd81384f3c616be4d08", "score": "0.68256277", "text": "public function get_entire_data1($id)\n {\n\t\t\t\t$id=$this->uri->segment(2, 0);\n\t\t\t\t//$this->db>where('flag',$flag);\n $query = $this->db->get_where('dokumen',array('id_butir'=>$id));\n //$query = $this->db->get('dokumen');\n\t\t\t\t//$query = 'select * from dokumen where flag=\"view\"';\n return $query->result_array();\n }", "title": "" }, { "docid": "62db2ff141fd78ae4252ba67fbce96a3", "score": "0.68182814", "text": "public function getDatataById($id)\n {\n // return $this->db->get_where('datata', ['id' => $id])->row_array();\n return $this->db->query(\n \"SELECT\n d.datata_id ,\n d.mhs_id ,\n d.tanggal,\n m.nim ,\n m.name ,\n d.judul ,\n d.sinopsis,\n d.status,\n d.jurusan_id,\n dd.dosen_id,\n dd.id as id_detail,\n dd.status as status_dosen\n FROM\n datata d\n inner join datata_detail dd on\n dd.datata_id = d.datata_id\n inner join mahasiswa m on\n m.mhs_id = d.mhs_id\n where\n d.datata_id = $id\"\n )->result();\n }", "title": "" }, { "docid": "c758a1adc6dfd08e7d3e3ba524e34253", "score": "0.68153465", "text": "public function getById(int $id) {\n return $this->model\n ->where('id', $id)\n ->get();\n }", "title": "" }, { "docid": "498a877d29e96c2102f879481324f4c6", "score": "0.6810957", "text": "public function getById( $id );", "title": "" }, { "docid": "bac2899007a7f09c3413a7102e6972f8", "score": "0.68035215", "text": "protected function getDetailDataById($id)\n {\n //create model\n $model = $this->getUserModel();\n $users = $this->mongoService->getDetailDataById($model, $id, $this->allowFilter);\n\n return $users;\n }", "title": "" }, { "docid": "572c4c1abd9dfdd54d5f2d5429e80b2c", "score": "0.6802086", "text": "public function getById(int $id);", "title": "" }, { "docid": "572c4c1abd9dfdd54d5f2d5429e80b2c", "score": "0.6802086", "text": "public function getById(int $id);", "title": "" }, { "docid": "96858802d2f1f3d785dcfcbd8d4833d6", "score": "0.6800972", "text": "public function get($id = null);", "title": "" }, { "docid": "273556c13b732d4b54031441541eda99", "score": "0.67875385", "text": "private function getDataById($id){\n $sql = \"SELECT * FROM $this->table WHERE `id` = '$id'\";\n $con = new Dbconnection();\n $db = $con->connect();\n $result = $db->prepare($sql);\n $result->execute();\n $count = $result->rowCount();\n if ($count > 0) {\n $this->data = $result->fetch(PDO::FETCH_ASSOC);\n } else {\n $error = \"Wrong result\";//TODO Make error a real thing\n echo \"error - No result<br />id = $this->id\";\n return;\n }\n }", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.6781608", "text": "public function retrieve($id);", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.6781608", "text": "public function retrieve($id);", "title": "" }, { "docid": "615db50bf77791f01cb6665c105ea0f7", "score": "0.6781111", "text": "public static function get($id) {}", "title": "" }, { "docid": "828c8cb823063a84edafdfadd8fbe261", "score": "0.67800087", "text": "public function getbyId($id)\n {\n }", "title": "" }, { "docid": "fb4c9accda95bfc4c390ff38dda853bb", "score": "0.677925", "text": "public function get_some_data ($id) {\n\t\treturn array (\n\t\t\t'id' => $id,\n\t\t\t'value' => 'Some data'\n\t\t);\n\t}", "title": "" }, { "docid": "32e68db1f5aa3237ef1f2fee76627d96", "score": "0.6778963", "text": "public function index_get($id = 0){\n if(!empty($id)){\n $data = $this->db->get_where(\"items\", ['id' => $id])->row_array();\n } else {\n $data = $this->db->get(\"items\")->result();\n }\n\n $this->response($data, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "c80538c3e2dd2ddaa6dc29c9c8cc0642", "score": "0.6772276", "text": "public function get_all_by_id($id)\n {\n $this->db->where('category_id', $id);\n $query = $this->db->get('industrial_and_security_products');\n return $query->result_array();\n }", "title": "" }, { "docid": "885db55f139f80320ad167dfb57b433e", "score": "0.6767114", "text": "function ambil_data_id($id){\n\t\t$this->db->where($this->id, $id);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "title": "" }, { "docid": "68ced182f7e594a4736c21254e23bf42", "score": "0.6765821", "text": "public function read($id = null): array\n {\n }", "title": "" }, { "docid": "bfe4234c433b9ede88ca580d8727d1a8", "score": "0.67590266", "text": "function service_get_data($id)\n{\n\t$query = db()->prepare('select name, latitude, longitude, address, ' .\n\t\t\t\t\t\t\t\t'phone_number, outdoor_seating, takeout, hours, price, ' .\n\t\t\t\t\t\t\t\t'parking, alcohol, accepts_credit_cards, reservations '.\n\t 'from restaurants where rid = ?');\n\t$query->execute(array($id));\n\t\t\n\treturn ($query->rowCount() > 0) ? $query->fetch() : NULL;\n}", "title": "" }, { "docid": "3713af6ad114c85097e4256be364b370", "score": "0.6756569", "text": "public function show($id)\n {\n //\n $info = DataResource::find($id)->toJson();\n return $info;\n }", "title": "" }, { "docid": "a5cfb8fe618b25750d2451452ebf9f94", "score": "0.67563695", "text": "public function getByID($id)\n {\n return $this\n ->where('id', $id)\n ->get();\n }", "title": "" }, { "docid": "2be6d6ca1147f02737deab1b83c20de9", "score": "0.67536974", "text": "public function listAll($id)\n {\n return $this->model\n ->where('city_id', $id)\n ->distinct()\n ->get();\n\n }", "title": "" }, { "docid": "ab6144be72f766f6cc639f8ab382a10d", "score": "0.67514414", "text": "public function get($id)\r\n {\r\n }", "title": "" }, { "docid": "42f8ad231a69ce05b83b1dd4dd59a199", "score": "0.6750192", "text": "public function fetchById($id);", "title": "" }, { "docid": "87ad10a9f6e060d0be6173f05d9ae66f", "score": "0.6746665", "text": "public function fetchById($id) {\n $select = $this->select()->where('id = ?', $id);\n return $this->fetchRow($select);\n }", "title": "" }, { "docid": "97b4fb6b0358673c00a74d378f95280a", "score": "0.6745155", "text": "public function getAPupilData(int $id)\n {\n $token = csrf_token();\n $p = Pupil::withTrashed('deleted_at')->whereId($id)->firstOrFail();\n\n $subjects = $p->classe->subjects;\n if ($p->level === \"primary\") {\n $subjects = Subject::whereLevel('primary')->get();\n }\n\n $classeFMT = $p->classe->getFormattedClasseName();\n $birthday = ModelHelper::birthFormattor($p, 0);\n\n $helper = new ModelHelper($p);\n $surname = $helper->setLastNameAndFirstName();\n\n $lastName = $helper->getLastName();\n $firstName = $helper->getFirstName();\n\n $classeName = $p->classe->name;\n\n return response()->json(['p' => $p, 'subjects' => $subjects, 'token' => $token, 'classeFMT' => $classeFMT, 'birthFMT' => $birthday, 'classeName' => $classeName, 'firstName' => $firstName, 'lastName' => $lastName]);\n }", "title": "" }, { "docid": "683d9bad3bb97d59735b99f9d9df46e8", "score": "0.6741662", "text": "public function getDatatable($id)\n {\n return Publication::where('created_by', $id)->orderBy('created_at', 'desc');\n }", "title": "" }, { "docid": "f6077d3672ec0da077584ef4e1bfb789", "score": "0.6741255", "text": "private function fetchItemData($id)\n {\n $response = $this->handleQuery(QueryDto\\LicenceVehicle\\PsvLicenceVehicle::create(['id' => $id]));\n\n return $response->getResult();\n }", "title": "" }, { "docid": "e95a620eca1ed5b6a8711001f3d769c1", "score": "0.67379725", "text": "public static function byUser($id)\n {\n return static::filtered($id)->get();\n }", "title": "" }, { "docid": "e1fad3e07d06acf1223925d159f87865", "score": "0.6735612", "text": "public function show($id)\n\t{\n\t\treturn showAll($id);\n\t}", "title": "" }, { "docid": "1eccd3cca6ee0178da93804342393a45", "score": "0.67323333", "text": "public function find(int $id): array;", "title": "" }, { "docid": "7c60fe9e4291202e03ebd1f51df7a889", "score": "0.6731925", "text": "public function consultarPorId($id)\n {\n $options = [\n 'path' => $this->getResourceEndpoint() . '/' . $id,\n 'method' => API::GET\n ];\n return $this->getAPI()->request($options);\n }", "title": "" }, { "docid": "7c60fe9e4291202e03ebd1f51df7a889", "score": "0.6731925", "text": "public function consultarPorId($id)\n {\n $options = [\n 'path' => $this->getResourceEndpoint() . '/' . $id,\n 'method' => API::GET\n ];\n return $this->getAPI()->request($options);\n }", "title": "" }, { "docid": "79faf13d98a43a58a7bac47f157337c8", "score": "0.67279255", "text": "public function getRecord($id);", "title": "" }, { "docid": "f81c53ff12b78c1c1b335fd42ebbc588", "score": "0.6723703", "text": "public function get( $id = null ) {\n $db = \\db\\Mysqli::getInstance();\n\n // Generating SQL query that selects single or all rows from table that we receive from child class\n // Output: SELECT * FROM Employees\n $sql = \"SELECT * FROM \" . $this->getTableName();\n\n // Condition checks if GET parameter named \"id\" was used in the request URL.\n // If it's true, then SQL query changes to following: SELECT * FROM Employees WHERE id = 1\n //\n if ( $id ) {\n $sql = $sql . \" WHERE id=$id\";\n }\n\n // Assigns response ( mysqli_result object ) of our previously created SQL query to the variable.\n // To access actual rows via this object, we have to trigger it with mysqli_fetch_assoc function.\n //\n $dbRes = $db->query( $sql );\n\n\n // Checks if an \"id\" get parameter was passed from client's request URL\n // and instantly returns the row. We don't have to use loop here, because\n // we know that only one row must be returned ( unique id ).\n //\n if ( $id ) {\n return mysqli_fetch_assoc( $dbRes );\n }\n\n // Creates an empty array that will be used to store data from the SQL response\n $resultSet = [];\n\n // Loop thought all rows in our table.\n // $answer contains associative array at every iteration.\n // This associative array contains single row data and looks like this:\n //\n //////////////////////////////\n //\n // [\"id\"]=> \"1\"\n // [\"firstname\"]=> \"Boris\"\n // [\"lastname\"]=> \"Berman\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"26\"\n //\n //////////////////////////////\n //\n // Next, at every iteration we assign associative array to numeric array we've created earlier.\n // So our numeric array would look like this:\n //\n // [0] =>\n // [\"id\"]=> \"1\"\n // [\"firstname\"]=> \"Boris\"\n // [\"lastname\"]=> \"Berman\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"26\"\n // [1] =>\n // [\"id\"]=> \"2\"\n // [\"firstname\"]=> \"Michael\"\n // [\"lastname\"]=> \"Cohen\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"35\"\n //\n //\n while( $answer = mysqli_fetch_assoc( $dbRes ) ){\n $resultSet[] = $answer;\n }\n\n // Return an array that contain all the rows from the table\n // Numeric array of associative arrays :)\n // return json_encode( $resultSet );\n return $resultSet;\n }", "title": "" }, { "docid": "d552470312c5c28b6f80b5b11305b9d7", "score": "0.6722874", "text": "function get_all () {\n\t\treturn $this->cache->get(\n\t\t\t'all',\n\t\t\tfunction () {\n\t\t\t\treturn $this->search([], 1, PHP_INT_MAX, 'id', true);\n\t\t\t}\n\t\t);\n\t}", "title": "" } ]
644d9059aada2185f5beaf4b925da6e0
Method to check whether this connector is enabled or not
[ { "docid": "8161a420c701a930112b9b904ed9a707", "score": "0.67880636", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_akeebasubs');\n\t}", "title": "" } ]
[ { "docid": "145b46a0473db5323c6f8134a8996e30", "score": "0.7731778", "text": "public function isConnectEnabled()\n {\n return craft()->charge_connect->getConnectEnabledStatus();\n }", "title": "" }, { "docid": "d5221e144a4f43462a5cc8010be3936a", "score": "0.7309763", "text": "public function enabled()\n {\n if (!empty($this->_data[self::VENDOR]) && !empty($this->_data[self::PASSWORD])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "65230929a221aef61ad3fe0eff343032", "score": "0.7221516", "text": "public function isEnabled(): bool\n {\n return $this->config['enabled'] ?? false;\n }", "title": "" }, { "docid": "3edce9989a70f546d834c32aa22c028c", "score": "0.7210134", "text": "public function is_enabled() : bool\n {\n return $this->enabled ?? FALSE;\n }", "title": "" }, { "docid": "df255265d1c0e6e8ea1c87af8debbe37", "score": "0.7201776", "text": "public function isEnabled()\n {\n return $this->enabled; // on retourne le champ de notre BDD\n }", "title": "" }, { "docid": "fd9813c3fe7a9f2ab1fb8c7584f2e7b2", "score": "0.7191645", "text": "public function isEnabled()\n {\n return $this->config->isEnabled();\n }", "title": "" }, { "docid": "5870685b76172220457cc7c202573c97", "score": "0.71906763", "text": "function is_enabled() {\n $destination = $this->get_destination();\n $profile = $this->get_profile();\n return (!empty($this->enabled) && !empty($destination) && !empty($profile));\n }", "title": "" }, { "docid": "88e48320939247b50b24a515e092a651", "score": "0.71443945", "text": "public function isEnabled()\n {\n return $this->getConfig()->isEnabled();\n }", "title": "" }, { "docid": "0bbab5e2f72e8d23a29eb690ab98861d", "score": "0.71251446", "text": "public function isEnabled(): bool\n {\n return $this->data['enabled'];\n }", "title": "" }, { "docid": "5a6afeebe751c55b838983316c05a0d3", "score": "0.7101924", "text": "public function enabled() {\r\n\t\treturn (bool) $this->request(WebDriver_Base::HTTP_GET, 'enabled');\r\n\t}", "title": "" }, { "docid": "85b2b9d393733a2545ab6c36282329f3", "score": "0.70698535", "text": "function isEnabled() {\n\t\treturn $this->getSetting('enabled');\n\t}", "title": "" }, { "docid": "af703c253bc78c1ec34eba0510247c4d", "score": "0.70588756", "text": "public function isEnabled() {\n\t\t$c = $this->getConfig();\n\t\treturn isset($c[\"enabled\"]) && $c[\"enabled\"];\n\t}", "title": "" }, { "docid": "095e5ff98b74fa56d2c773dee4b358fd", "score": "0.7029505", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_community');\n\t}", "title": "" }, { "docid": "023a2a6ce6a3b27667530630eeb97b1c", "score": "0.7011634", "text": "public function isEnabled()\n {\n return Mage::getStoreConfig(self::XML_PATH_FASTLY_CDN_WEBHOOKS_ENABLED);\n }", "title": "" }, { "docid": "153b7267f5c581483da439e9bb2e899c", "score": "0.69994813", "text": "public function is_enabled(){\n\t\treturn $this->enabled;\n\t}", "title": "" }, { "docid": "1d751e9f7bed4a9e19881b1db4e8644d", "score": "0.69828075", "text": "public function isEnabled()\n {\n return\n !!$this->scopeConfig->getValue(static::XML_PATH_ENABLED) &&\n !!$this->getApiHostname() &&\n !!$this->getIntegrationKey() &&\n !!$this->getApiHostname() &&\n !!$this->getSecretKey();\n }", "title": "" }, { "docid": "6c218f30d2061eff4282cad76dcc86e3", "score": "0.69774663", "text": "public static function enabled(): bool\n {\n return self::$enabled;\n }", "title": "" }, { "docid": "1e5e2807d8b91b1596c0e6c3203247ed", "score": "0.697621", "text": "public function hasConnector()\n {\n return null !== $this->__codeConn && null !== $this->__secretKey;\n }", "title": "" }, { "docid": "8bea55ca758ba7c2b4d47074160771fc", "score": "0.6973595", "text": "public function isEnable()\n {\n return $this->scopeConfig->getValue('mageowl/config/enable');\n }", "title": "" }, { "docid": "3932dd6be35024849ba29763c10ec642", "score": "0.69538134", "text": "public function isEnabled()\n {\n $nextCloud = new NextcloudSettings();\n return (string)$nextCloud->enabled === \"1\";\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "ec9dc39c6cfbafb26723edbb694c5a4e", "score": "0.6897692", "text": "public function is_enabled() {\n\t\treturn defined( 'HKM_REQUEST_PROXY_HOST' ) && defined( 'HKM_REQUEST_PROXY_PORT' );\n\t}", "title": "" }, { "docid": "f9c30c2617da1c8331aa1fe0aec29a04", "score": "0.68968487", "text": "public function isConnected()\n {\n return isset($this->conn);\n }", "title": "" }, { "docid": "7b2edd5ee74eee5889df442506a073fb", "score": "0.6894042", "text": "public function isEnabled(): bool\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "5516cfda884b224e3fd1a5ab961d8e4b", "score": "0.68888366", "text": "public function isEnabled()\n {\n return $this->metadata()['enabled'];\n }", "title": "" }, { "docid": "5b429602d1adc334b352fc30444af5fc", "score": "0.68621415", "text": "public function isEnabled()\n\t{\n\t\treturn $this->enabled;\n\t}", "title": "" }, { "docid": "d491d9f949fc01dc65a876596e3a384c", "score": "0.686181", "text": "public function isConnected() {\n return isset($this->conn);\n }", "title": "" }, { "docid": "5b40f3401cd41b6b89153732930bdcdf", "score": "0.68595", "text": "public function isEnabled() {\r\n return $this->enabled;\r\n }", "title": "" }, { "docid": "08ad9a78ecda1863febd129e26f5afa9", "score": "0.68586534", "text": "public function isEnabled()\n {\n return (bool) $this->getData(self::ENABLED);\n }", "title": "" }, { "docid": "08fffef515f8942f6b7c088c0bd34409", "score": "0.684644", "text": "public function isEnabled()\n {\n return Mage::helper('greenghost_hauntedworld')->isEnabled();\n }", "title": "" }, { "docid": "6e01cf3678b212e965df237467664e3e", "score": "0.68413377", "text": "public function isEnabled()\n {\n return $this->_enabled;\n }", "title": "" }, { "docid": "b82a17e45374d50821901aab1a08de7f", "score": "0.6833447", "text": "protected function checkStatusEnabled()\n {\n return config('tail-db.enabled');\n }", "title": "" }, { "docid": "ab7026139a3ce4a141ae5f80e31fbbd2", "score": "0.68314207", "text": "public function isEnabled()\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "ab7026139a3ce4a141ae5f80e31fbbd2", "score": "0.68314207", "text": "public function isEnabled()\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "2500307651b18b8f6940e212240d4fa1", "score": "0.68276983", "text": "public function is_enabled() : Bool\n\t{\n\t\treturn $this->_enabled;\n\t}", "title": "" }, { "docid": "7a83393c1e736d4e5df7b62f41444b66", "score": "0.6827137", "text": "public function isEnabled() {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "638f875b0bf9442bd5a18d06b0ec811b", "score": "0.682443", "text": "public function isEnabled(){\n return $this->enabled;\n }", "title": "" }, { "docid": "70601d49ba4965f100e5911b3eaa4829", "score": "0.6815799", "text": "public function hasConnection()\n {\n return (bool) $this->_connection;\n }", "title": "" }, { "docid": "55ec0c2c1e9a86c735a0a700f45d3a48", "score": "0.6804553", "text": "public function isEnabled(): bool\n\t{\n\t\treturn $this->isEnabled;\n\t}", "title": "" }, { "docid": "b4bad66e9ec727a39dd45efb8c924726", "score": "0.6797334", "text": "public function isEnabled()\n\t{\n\t\treturn $this->getIsEnabled();\n\t}", "title": "" }, { "docid": "1461036382c6cb9d7d7c1bd043b7c778", "score": "0.6796205", "text": "public function isConnected() {\n\t\treturn isset($this->conn);\n\t}", "title": "" }, { "docid": "1286ecaff61e5d94ff2f647e9a990698", "score": "0.6784973", "text": "public function canEnable()\n {\n // check necessary permissions\n return $this->gatewaySettings->isReady() && $this->gatewayPermissions->hasPermission('tfa');\n }", "title": "" }, { "docid": "c25388b9e0643e027ba25c210ec33923", "score": "0.67844003", "text": "public function hasIsEnabled()\n {\n return $this->is_enabled !== null;\n }", "title": "" }, { "docid": "99c71da99acfec74ca64c350d8246c8f", "score": "0.67792404", "text": "public function isEnabled( )\n {\n if ( $this->isEnabled === NULL )\n {\n /**\n * In another use, this was populated by a memcache key.\n * Changed to use the constant, but left it in so it's still configurable.\n */\n $this->isEnabled = self::NEXMO_API_ENABLED;\n }\n\n return $this->isEnabled;\n }", "title": "" }, { "docid": "d9ed8431238c8d1b01755d6d16037d3f", "score": "0.6778575", "text": "function is_connected()\n {\n return !is_null($this->connectionid);\n }", "title": "" }, { "docid": "fc15b78acb2093b6627a4584ab27a9ab", "score": "0.67768043", "text": "public function isEnabled() {\n return Mage::getStoreConfigFlag(self::CONFIG_ENABLED);\n }", "title": "" }, { "docid": "8cc1d698847f022c3eecededb70134dc", "score": "0.67715526", "text": "private function isConnected()\r\n {\r\n /** @var \\Concrete\\Core\\Marketplace\\Marketplace $marketplace */\r\n $marketplace = Marketplace::getInstance();\r\n\r\n return $marketplace->isConnected();\r\n }", "title": "" }, { "docid": "7208cc26777336b040a0420fea069c1a", "score": "0.67665267", "text": "public function isEnabled()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_IS_ENABLED, $payload);\n\n $payload = unpack('C1enabled', $data);\n\n return (bool)$payload['enabled'];\n }", "title": "" }, { "docid": "2b8029fc2d08435415df4d2ef9930d99", "score": "0.6759073", "text": "public function isEnabled()\n\t{\n\t\treturn \\IPS\\Settings::i()->authy_enabled;\n\t}", "title": "" }, { "docid": "ec53bf92de3bf6297060b112de38a659", "score": "0.67476577", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_ccnewsletter');\n\t}", "title": "" }, { "docid": "58bad0f517a5d75fda0752aa92779ce5", "score": "0.67467034", "text": "public function getEnabled()\n {\n return isset($this->enabled) ? $this->enabled : false;\n }", "title": "" }, { "docid": "285297016ca77f022c7fa98b8578b5f6", "score": "0.6737993", "text": "public function isEnabled() {\n if (!$this->enabled){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "aada369ecba3dd95ed994b1abdc83428", "score": "0.67369455", "text": "public function getIsEnabled()\n {\n return $this->getEngine()->getIsEnabled();\n }", "title": "" }, { "docid": "339f890fce2cf3c6b9e584baeb93d3f9", "score": "0.67365915", "text": "private function _isEnabled() {\n return Mage::getStoreConfigFlag(\"contactlab_transactional/global/enabled\");\n }", "title": "" }, { "docid": "1d8b829c4b1364ceed7bfe87a73fc76d", "score": "0.6735189", "text": "public function enabled(){\n\t\t$settings = $this->get_settings();\n\t\tif( $settings[ 'cdn' ] ){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "97b9108b2527f8658834f5feacaecf8b", "score": "0.6728567", "text": "public function isEnabled()\n {\n return Mage::getStoreConfigFlag(self::XML_ENABLED_PATH);\n }", "title": "" }, { "docid": "05dbde9def85483c09d69e4b4f3d376d", "score": "0.6727112", "text": "public function enabled()\n {\n if($this->status == 'enabled')\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b478b70a0c6f46486e3caf8b5b86915e", "score": "0.6712077", "text": "function is_enabled() {\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "9ae7fe053f654d4e256243b44e45f5be", "score": "0.6707288", "text": "public function getIsEnabled();", "title": "" }, { "docid": "5181f4570cc885c7c667e5c0eb91c935", "score": "0.6685116", "text": "public function isConnected()\n {\n return $this->isConnected;\n }", "title": "" }, { "docid": "0f425f6634f249df45a42b57d5ead0de", "score": "0.66831356", "text": "public function getEnabled() : bool\n {\n return $this->getProperty()->enabled;\n }", "title": "" }, { "docid": "a50f6e311e40eb75041ced378d25018d", "score": "0.6682574", "text": "public function isEnable() {\n\t\t\treturn Mage::getStoreConfig('addressvalidator/addressvalidator_settings/addressvalidator_active');\n\t}", "title": "" }, { "docid": "ddb3ef7cd13407c4cae3eaea91b7682b", "score": "0.6680571", "text": "protected function isConnected()\n {\n return $this->is_connected;\n }", "title": "" }, { "docid": "3bbabc69b40cb80de30acbec166057c2", "score": "0.66730434", "text": "public function isConnected()\n {\n return $this->connection->isConnected();\n }", "title": "" }, { "docid": "3bbabc69b40cb80de30acbec166057c2", "score": "0.66730434", "text": "public function isConnected()\n {\n return $this->connection->isConnected();\n }", "title": "" }, { "docid": "054a44a958e038a28a3a4f39b5697454", "score": "0.6668789", "text": "public function isConnected()\n {\n return $this->resource !== null;\n }", "title": "" }, { "docid": "4538bcba240afb92ee1618f551e8b36c", "score": "0.66638935", "text": "public function is_enabled() {\n $enabled = (bool) get_config('reportgen', 'rootDetails');\n return $enabled;\n }", "title": "" }, { "docid": "21f5a12f1bf6b1a637c707b36fa1fb64", "score": "0.66615033", "text": "public function is_connected()\n {\n return($this->connected);\n }", "title": "" }, { "docid": "4d59261a88857718f00e0a4240b4f1dc", "score": "0.66502875", "text": "public function isEnabled() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "05d4db84460820ff5f80b3db126db960", "score": "0.66500944", "text": "public function isEnabled()\n {\n return true;\n }", "title": "" }, { "docid": "ea65ad2e1169867bd2a63a6dd9a77e3a", "score": "0.6642524", "text": "public function isEnabled()\n {\n // verify solr server response\n \n return $this->_solrIsEnabled;\n }", "title": "" }, { "docid": "b7b3100a22c6d1e60e4e913185525f85", "score": "0.6637622", "text": "public function isEnable()\n {\n return $this->scopeConfig->getValue(DefaultConfig::CONFIG_PATH_IS_ENABLE);\n }", "title": "" }, { "docid": "d6a3d52e205fd027dbfb0a119e78ac94", "score": "0.66367507", "text": "public function isConnected() {\n return $this->_isConnected;\n }", "title": "" }, { "docid": "24c96c879b7551f36b74d01dcae29ea2", "score": "0.6633758", "text": "public function isEnabled()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "98a76bdf22c0edb4537253563f72477d", "score": "0.66275656", "text": "public function isConnected() : bool\n {\n return isset($this->streamSocket);\n }", "title": "" }, { "docid": "c67c6c1d94f9dee065162d27e5f79397", "score": "0.66194654", "text": "public function getIsEnabled()\n {\n return true;\n }", "title": "" }, { "docid": "fe4b9e202884514aab029382fdf86cb6", "score": "0.6615054", "text": "public function enabled()\r\n\t{\r\n\t\treturn $this->enabled;\r\n\t}", "title": "" }, { "docid": "20c0e9c50d5a9b381db27d9a60dde3b1", "score": "0.6614092", "text": "public function enabled()\n {\n if ((bool)$this->getStoreConfig('advanced/modules_disable_output/Yireo_EmailTester')) {\n return false;\n }\n\n return $this->getStoreConfig('emailtester/settings/enabled');\n }", "title": "" }, { "docid": "d0a4edf5e3a7deab03ff82e2431abe70", "score": "0.66135526", "text": "public function isEnabled() : bool\n {\n return $this->status == $this::ACTIVE;\n }", "title": "" }, { "docid": "ec118f77e24abef6e01ce3bccb504d0e", "score": "0.661144", "text": "public function isEnabled(): bool\n {\n return !$this->disabled;\n }", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "2c8c2f0267b4d40b31d755a4b3162bcc", "score": "0.66079944", "text": "public function isConnected()\n {\n return $this->_connection !== null;\n }", "title": "" }, { "docid": "c2a81e11e78e134ad1f92fefc11000a8", "score": "0.66004753", "text": "public function alternateAccessCheck() {\n return self::config()->enabled;\n }", "title": "" }, { "docid": "f138f8b5e81d7939bfc599fa7b11f713", "score": "0.65982276", "text": "public function isEnabled()\n {\n return $this->getIsActive();\n }", "title": "" } ]
d44768dc39112d55ad6be4f4262a68a5
The function checks if the product exists in $items and return the position in $items or 1 if the product doesn't exist.
[ { "docid": "e76a7bd35b4b395c60b3828f8b33ebc3", "score": "0.7808392", "text": "private function existsInItems($productName) {\n $pos = -1;\n if($this->numItems == 0)\n return $pos;\n $arr = $this->items;\n for($i = 0; $i < count($arr); $i++) {\n if($arr[$i][0] == $productName) { \n $pos = $i;\n break;\n }\n }\n return $pos;\n }", "title": "" } ]
[ { "docid": "4bfd10837b90c84b5fdaa918cf8c0205", "score": "0.6641367", "text": "function check_item($product_item_id) {\r\n\t\r\n\t\t$products = $this->Session->read('Cart'); \r\n\t\tif (isset($products[$product_item_id])) {\r\n\t\t\treturn $products[$product_item_id];\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2c890b80f14915785bda2226db7c30aa", "score": "0.6462003", "text": "private function findItem($name){\n $index = 0;\n foreach($this->inventory as $item){\n if($item->name == $name) {\n return $index;\n }\n $index++;\n }\n return null;\n }", "title": "" }, { "docid": "2cd7c99197f067c904f87497154fdc66", "score": "0.6068631", "text": "public function get($itemInput)\n {\n $count = 0;\n foreach ($this->itemQtyArr as $item => $qty) {\n if ($item == $itemInput) {\n return $qty;\n }\n }\n return $count;\n }", "title": "" }, { "docid": "d32f32b28cb943aefc9dc80a7a6f47bb", "score": "0.58862936", "text": "function product_exists($product_id)\r\n{\r\n\t$product_id = intval($product_id);\r\n\t$max = count($_SESSION['cart']);\r\n\t$flag = 0;\r\n\t\r\n\tfor($i = 0; $i < $max; $i++)\r\n\t{\t\r\n\t\tif($product_id == $_SESSION['cart'][$i]['productid']) //here again changed to id was productid\r\n\t\t{\r\n\t\t\t$flag = 1;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn array ($flag,$i);\r\n\t\r\n}", "title": "" }, { "docid": "14a3bd38bd0820f97971cd0fb0a62e06", "score": "0.5795401", "text": "public function actionIsItemExist($product_id) {\r\n if (Yii::$app->user->getId()) {\r\n $exist = Wishlist::find()->where(['item_id' => $product_id, 'customer_id' => Yii::$app->user->getId()])->one();\r\n return ($exist) ? $exist->wishlist_id : 0;\r\n }\r\n }", "title": "" }, { "docid": "b4852b06f65b4d43d24bb8dbc0ec05e4", "score": "0.5777025", "text": "function item_id_exists($item_id='') {\n\t // Return TRUE if an item exists\n\t // Return FALSE otherwise\n\t if($item_id != '') {\n\t\t $query = \"SELECT * FROM items WHERE id = '\".mydb::cxn()->real_escape_string($item_id).\"'\";\n\t\t $result = mydb::cxn()->query($query);\n\t \n\t\t return $result->num_rows > 0 ? TRUE : FALSE;\n\t }\n\t else return FALSE;\n }", "title": "" }, { "docid": "3a35bfcd9d8d848a8e3f9e0aaa3ea4f5", "score": "0.5756743", "text": "public function itemExists($sku);", "title": "" }, { "docid": "8ba18ad53d4d295bc0a33a69d0f5f110", "score": "0.5708303", "text": "function findIndex($items, $label, $value)\n{\n if (!is_array($items))\n {\n throw new Exception(\"Items is not array\");\n }\n $found = false;\n $indexOf = -1;\n foreach ($items as $key => $item) {\n if ($found === true) break;\n if ($item[$label] === $value)\n {\n $found = true;\n $indexOf = $key;\n }\n }\n\n return $indexOf;\n}", "title": "" }, { "docid": "61c172f18065791d47bc1f710f958fcb", "score": "0.56765884", "text": "function find($item) {\n\t\treturn $this->zc_type(array_search($item, $this->a));\n\t}", "title": "" }, { "docid": "b786a6ac0f2b2c78c48807cedcbae1aa", "score": "0.5661562", "text": "public function exist( $idProductoItem )\n\t{\n\t\treturn (bool) $this->createQuery('ppi')\n \t\t\t ->addWhere('ppi.id_producto_item = ?', array( $idProductoItem ) )\n \t\t\t ->count();\n\t}", "title": "" }, { "docid": "005f4d925ca5eb3e886231411e0fead6", "score": "0.56423324", "text": "private function getIndexProduct ( $newproduct ) {\n\t\t$NS = new Zend_Session_Namespace ( 'Default' );\n\t\tif (! empty ( $NS->cart->products ) && is_array ( $NS->cart->products )) {\n\t\t\t$products = $NS->cart->products;\n\t\t\t$index = 0;\n\t\t\t\n\t\t\tif (is_array ( $products ) && count ( $products ) > 0) {\n\t\t\t\t\n\t\t\t\t// Read all the product added in the cart\n\t\t\t\tforeach ( $products as $product ) {\n\t\t\t\t\t// Match the product cycled with the hosting product previously inserted in the cart\n\t\t\t\t\tif ($product ['product_id'] == $newproduct ['product_id']) {\n\t\t\t\t\t\treturn $index;\n\t\t\t\t\t}\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "07b1d09f08e3c2908488758a25d83d5f", "score": "0.56421626", "text": "public function inCart($searchItem){\n \t$this->loadModel();\n foreach($this->cart as $key => $item){\n if($item[$this->model][$this->Model->primaryKey] == $searchItem[$this->model][$this->Model->primaryKey]){\n return $key;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8f5681d774c501a7aec335c951ad623e", "score": "0.5630493", "text": "private static function check_items($items){\n\n\n if ($items == null || !is_array($items) || count($items) === 0){\n return \"Order Items not found\";\n }\n\n foreach($items as $item){\n $product = Product::where(\"id\", $item['id'])->where('available', '>=', $item['unit'])->first();\n if ($product === null){\n return $item['name'].' Not Available';\n }\n }\n\n if (self::total_cost($items) > 1000){\n return 'Sorry, The maximum order you can make at a time is $1000';\n }\n\n return null;\n }", "title": "" }, { "docid": "dd51cf562d064fd8779e37de5df157d4", "score": "0.56046534", "text": "public function findCartItemIndex(string $id): ?int\n {\n $items = $this->getAttribute('items');\n\n foreach ($items as $index => $item) {\n if ($item->id === $id) {\n return $index;\n }\n }\n\n return -1;\n }", "title": "" }, { "docid": "112873f0acadf807d1d795cd329ce5a5", "score": "0.5604363", "text": "public function getPosition()\n {\n if (count($this->getItemsAsArray()) == 0) {\n return -1;\n }\n\n \treturn parent::getPosition();\n }", "title": "" }, { "docid": "c82cee23f8efef21c3a2913510e3cf7b", "score": "0.5600829", "text": "function checkIfProductsExists($quantityAvailable) {\n foreach($quantityAvailable as $product=>$quantity) {\n if($quantity > 0) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "6781bfb7e256097df58aa897e7329b32", "score": "0.5596194", "text": "public function exists(){\r\n\r\n // query to count existing cart item\r\n $query = \"SELECT count(*) FROM \" . $this->table_name . \" WHERE product_id=:product_id AND user_id=:user_id\";\r\n\r\n // prepare query statement\r\n $stmt = $this->conn->prepare( $query );\r\n\r\n // sanitize\r\n $this->product_id=htmlspecialchars(strip_tags($this->product_id));\r\n $this->user_id=htmlspecialchars(strip_tags($this->user_id));\r\n\r\n // bind category id variable\r\n $stmt->bindParam(\":product_id\", $this->product_id);\r\n $stmt->bindParam(\":user_id\", $this->user_id);\r\n\r\n // execute query\r\n $stmt->execute();\r\n\r\n // get row value\r\n $rows = $stmt->fetch(PDO::FETCH_NUM);\r\n\r\n // return\r\n if($rows[0]>0){\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "720d4083d8cfc5b02e012a873a6b320a", "score": "0.55416405", "text": "function check_existence_id($arr,$index)\r\n {\r\n foreach ($arr as $single_index) \r\n {\r\n \r\n if($single_index['product_id'] == $index)\r\n {\r\n return FALSE;\r\n }\r\n\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "a958390200f16a1ec7dfea0bbc2823f2", "score": "0.5513908", "text": "public function testShouldFindItem()\n {\n $item = $this->service\n ->setModel($this->model)\n ->handle();\n\n $this->assertTrue($item);\n $this->assertDatabaseMissing('items', [\n 'id' => $this->model->id\n ]);\n }", "title": "" }, { "docid": "30b1032ce00d2fc6aef703e20e40d452", "score": "0.54885787", "text": "public function indexOf( $item )\n\t\t{\n\t\t\tif( $item instanceof EventBase )\n\t\t\t{\n\t\t\t\tfor( $i = 0, $count = count( $this->items ); $i < $count; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif( $this->items[$i]->name === $item->name )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::indexOf() must be an object of type EventBase\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bca46d973cc557f6dfae985ae2ff12b3", "score": "0.5484898", "text": "public function exist_product ($product_id) {\n $sql = \"SELECT id FROM prod WHERE id = ?\";\n $exist = $this->db_query($sql, \"i\", array($product_id));\n if (isset($exist)){\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "cae7b0ab7b3b97ea7f1a055aef04585e", "score": "0.54846984", "text": "function cnt($item)\n {\n // PHP7.1 and below returns 0 on any number\n if (is_null($item)) return 0;\n\n // PHP7.1 and below returns 1 on any number\n if (is_numeric($item)) return 1;\n\n // PHP7.1 and below returns 1 on any string\n if (is_string($item)) return 1;\n\n try {\n // Use PHP's native count\n return count($item);\n } catch (\\Exception $e) {\n // If its object does not impliment Countable, return 0\n return 0;\n }\n }", "title": "" }, { "docid": "9c56c61f4dbd7888eafbd2d4409d776f", "score": "0.54762757", "text": "function osc_has_items() {\n if ( View::newInstance()->_exists('resources') ) {\n View::newInstance()->_erase('resources');\n }\n if ( View::newInstance()->_exists('item_category') ) {\n View::newInstance()->_erase('item_category');\n }\n if ( View::newInstance()->_exists('metafields') ) {\n View::newInstance()->_erase('metafields');\n }\n if(View::newInstance()->_get('itemLoop')!='items') {\n View::newInstance()->_exportVariableToView('oldItem', View::newInstance()->_get('item'));\n View::newInstance()->_exportVariableToView('itemLoop', 'items');\n }\n $item = View::newInstance()->_next('items');\n if(!$item) {\n View::newInstance()->_exportVariableToView('item', View::newInstance()->_get('oldItem'));\n View::newInstance()->_exportVariableToView('itemLoop', '');\n } else {\n View::newInstance()->_exportVariableToView('item', View::newInstance()->_current('items'));\n }\n return $item;\n }", "title": "" }, { "docid": "56f33681c3c2737230e13b6804838a14", "score": "0.54524297", "text": "public function search($value): ?int\n\t{\n\t\treturn ($result = array_search($value, $this->items)) !== false ? $result : null;\n\t}", "title": "" }, { "docid": "cee6bd23d671e04fc76c4d40ab097a70", "score": "0.5448984", "text": "function get_item($items, $item_name) {\n foreach ($items as $current) {\n $current_name = $current[\"name\"];\n if ($current_name === $item_name) { // name matches\n return $current;\n }\n }\n\n return null; // not in items\n }", "title": "" }, { "docid": "211ad26ce175be988d3b7336f5809298", "score": "0.5441611", "text": "function sp_menu_check_duplicate_items($id, $namespace)\n{\n\t$db = database();\n\n\t$result = $db->query('', '\n\t\tSELECT\n\t\t\tid_item\n\t\tFROM {db_prefix}sp_menu_items\n\t\tWHERE namespace = {string:namespace}\n\t\t\tAND id_item != {int:current}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'namespace' => $namespace,\n\t\t\t'current' => $id,\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($has_duplicate) = $db->fetch_row($result);\n\t$db->free_result($result);\n\n\treturn $has_duplicate;\n}", "title": "" }, { "docid": "ff8e7cb086dd021e65f8dd54ffa12c8c", "score": "0.54330957", "text": "protected function searchProductById(array $productList, int $productId, array & $usedIndexes)\n\t{\n\t\tif ($productId === 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$usedIndexes[$productId] ??= [];\n\t\tforeach ($productList as $index => $item)\n\t\t{\n\t\t\tif (in_array($index, $usedIndexes[$productId], true))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($productId === (int)$item['PRODUCT_ID'])\n\t\t\t{\n\t\t\t\t$usedIndexes[$productId][] = $index;\n\t\t\t\treturn $index;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7f8aae98806c93e94a40fed683000498", "score": "0.5432758", "text": "public function check_product_exists($params, $item_name_vn = null)\n {\n $this->db->select(\"1\");\n $this->db->from('m_items');\n $this->db->where('trim(item_code)', trim($params['item_code']));\n // $this->db->where('trim(customer_code)', trim($params['customer_code']));\n if (isset($params['customer'])) {\n $this->db->where('trim(customer)', trim($params['customer']));\n }\n $this->db->where('trim(jp_code)', trim($params['jp_code']));\n $this->db->where('trim(item_name)', trim($params['item_name']));\n if(isset($item_name_vn) && $item_name_vn != null) {\n $this->db->where('trim(item_name_vn)', trim($item_name_vn));\n }\n $this->db->where('trim(salesman)', trim($params['salesman']));\n $this->db->where('trim(size)', trim($params['size']));\n $this->db->where('trim(color)', trim($params['color']));\n $this->db->where('del_flg', '0');\n\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return TRUE;\n } else {\n if($query->result_array())\n return FALSE;\n }\n }", "title": "" }, { "docid": "c79a89749eaea65b8b93df3c51531e0b", "score": "0.5419483", "text": "public function compare(Item $itemA, Item $itemB): int;", "title": "" }, { "docid": "1cbcec78fd6b059d12d01ca4ff02476f", "score": "0.5411128", "text": "function num_items() {\r\n\t\r\n\t\t$products = $this->Session->read('Cart'); \r\n\t\treturn count($products);\r\n\t}", "title": "" }, { "docid": "fad855591c7805d729a64db5c21de532", "score": "0.5397724", "text": "function findIdenticalItem($product, DataObjectSet $productOptions) {\n\t \n\t foreach ($this->Items() as $item) {\n\n\t if ($item->ObjectID == $product->ID && $item->ObjectVersion == $product->Version) {\n\t \n \t $productOptionsMap = array();\n \t $existingOptionsMap = array();\n \t \n \t if ($productOptions) {\n \t $productOptionsMap = $productOptions->map('ID', 'Version');\n \t }\n\n \t if ($item) foreach ($item->ItemOptions() as $itemOption) {\n \t $productOption = $itemOption->Object();\n \t $existingOptionsMap[$productOption->ID] = $productOption->Version;\n \t }\n \t \n \t if ($productOptionsMap == $existingOptionsMap) {\n \t return $item;\n \t }\n\t }\n\t }\n\t}", "title": "" }, { "docid": "a446fabd5f689388ce6ccd65f898c920", "score": "0.53514296", "text": "function GetNumOfItems()\n {\n $sql = \"SELECT 0 FROM item WHERE itemCategory='\".$this->categoryId.\"'\";\n $result = mysqli_query($this->conn, $sql);\n\n return mysqli_num_rows($result);\n }", "title": "" }, { "docid": "6c02d8113ae972ca041016b85d5c9310", "score": "0.53476363", "text": "public function getProductId($item)\n {\n return $item->getProduct()->getId();\n }", "title": "" }, { "docid": "f53a8aa5cfa685d68618d63a2aea871e", "score": "0.53336483", "text": "function productExistInShoppingCart($dale, $product_id, $id_user){\n\t\t$shopCart = $dale->kueri(\"SELECT *\n\t\t\t\t\t\t\t\t FROM `shopping_cart` \n\t\t\t\t\t\t\t\t WHERE id_service_product = '\".$product_id.\"' AND\n\t\t\t\t\t\t\t\t \t\t id_user = '\".$id_user.\"'\");\n\n\t\t$shopCart = json_decode($shopCart);\n\n\t\tif(sizeof($shopCart) == 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn $shopCart[0] -> id_shopcart;\n\t}", "title": "" }, { "docid": "b1971ce75df95e4afa85eb9e0a577255", "score": "0.53203386", "text": "public function key($item);", "title": "" }, { "docid": "1fda215e2d5a932f50f964412bc1f40e", "score": "0.53172094", "text": "function findMatchingItem($item) {\n if($item->getParentId() == 0) {\n $dar = $this->searchMatchingItem($item, 0);\n if($dar && !$dar->isError() && $dar->rowCount() == 1) {\n $row = $dar->getRow();\n if($this->checkItemPermissions($row['item_id'])) {\n $this->itemMapping[$item->getId()] = $row['item_id'];\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "7014cb541a95721fc0c448f47f600cd9", "score": "0.53143877", "text": "function linearSearch($anArray, $item) {\n for ($i = 0; $i < sizeof($anArray); $i++) {\n if ($anArray[$i] === $item) {\n return $i;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "d04315f0c3f7fa75ad68bb9b69e4a38f", "score": "0.5310248", "text": "public function GetIndex() {\n $index = key($this->_item);\n if (is_numeric($index))\n return intval($index);\n return -1;\n }", "title": "" }, { "docid": "27bcd0904c27e3be2fa2f67ffe5aacd9", "score": "0.52986944", "text": "protected function items_Found() {\n $countProjects = Productodefecto::CountAll();\n if ($countProjects == 0) {\n QApplication::ExecuteJavaScript(\"itemsFound(1);\");\n } else {\n QApplication::ExecuteJavaScript(\"itemsFound(2);\");\n }\n }", "title": "" }, { "docid": "59f03dbdc965cbda1d3556cfa256e282", "score": "0.52726644", "text": "public function izbergProductInIzbergCart($items, $izberg_product_id)\n {\n $result = null;\n foreach($items as $item) {\n if ($item->product->id == $izberg_product_id) {\n $result = $item;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "b75fa12510724032a1ff838885ffde35", "score": "0.5249119", "text": "public function offsetExists($index) {\n return isset($this->_items[$index]);\n }", "title": "" }, { "docid": "94ef6b6649d3b489509b0ca0e7007694", "score": "0.5240557", "text": "public function itemCount(): int {\n\t\treturn count($this->m_items);\n\t}", "title": "" }, { "docid": "49d5fde6d16563e5d7590e719da771a6", "score": "0.52374816", "text": "public function getBasketItem($productId, $price = NULL, array $props = array())\n {\n $needCheckProps = !empty($props);\n\n foreach($this->getBasket() as $item)\n {\n if($item->getProductId() == $productId && (isset($price) ? $item->getField('PRICE') == $price : true))\n {\n if($needCheckProps)\n {\n $found = true;\n $count = 0;\n foreach($item->getPropertyCollection() as $prop)\n {\n ++$count;\n $code = $prop->getField('CODE');\n $found = $found && isset($props[$code]) && $props[$code] == $prop->getField('VALUE');\n }\n if($count <= count($props) && $found)\n return $item;\n }\n else\n return $item;\n }\n }\n return false;\n }", "title": "" }, { "docid": "bb16fc24f1a64702c1ca2f570ee70406", "score": "0.5233642", "text": "function verifyItems($origItems, $origPrices, $items, $prices) {\n\t$origItemsMap = [];\n\tforeach ($origItems as $key => $value) {\n\t\t$origItemsMap[$value] = $origPrices[$key];\n\t}\n\t$mistake = 0;\n\tforeach ($items as $key => $value) {\n\t\tif(!array_key_exists($value, $origItemsMap)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif($origItemsMap[$value] !== $prices[$key]) {\n\t\t\t$mistake++;\n\t\t}\n\t}\n\treturn $mistake;\n}", "title": "" }, { "docid": "39d2712ba25c98fb542f2e29b0ad19a3", "score": "0.52290344", "text": "public function getProductRank($products, $asin)\r\n\t{\r\n\t\tforeach ($products as $key => $product) {\r\n\t\t\tif ($product->asin == $asin) {\r\n\t\t\t\t$rank = $key + 1;\r\n\t\t\t\treturn $rank;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "a10ca11a7821b45e515b056cee8e4f1c", "score": "0.52208424", "text": "private function find($item)\n {\n $low = 0;\n $high = $this->data->count() - 1;\n\n while ($low <= $high) {\n $mid = ($low + $high) >> 1; //shift the bits of ($low+$hight) result to the right (each step means \"divide by two\")\n $tmp = $this->data->offsetGet($mid);\n\n if ($item instanceof ComparableInterface) {\n $result = $this->getComparableMode() === self::COMPARABLE_MODE_CASE_SENSITIVE\n ? $item->compareTo($tmp)\n : $item->compareToIgnoreCase($tmp);\n } elseif (is_int($item) || is_float($item)) {\n if ($item < $tmp) $result = -1;\n elseif ($item > $tmp) $result = 1;\n else $result = 0;\n } elseif (is_string($item)) {\n $result = $this->getComparableMode() === self::COMPARABLE_MODE_CASE_SENSITIVE\n ? strcasecmp($item, $tmp)\n : strcmp($item, $tmp);\n } else {\n throw new \\InvalidArgumentException('BinarySearch::find only accepts ComarableInterface|string|int|float, '.gettype($item) . ' given.');\n }\n\n if ($result === 0) //item has been found, return its location\n return $mid;\n if ($result < 0) //item comes before middle elements, search the top of the table\n $high = $mid - 1;\n else //item comes after the middle elements, search the bottom of the table\n $low = $mid + 1;\n }\n //item is not in the list, return a signal that gives the location where\n //the item should be inserted into the list.\n return -$low - 1;\n }", "title": "" }, { "docid": "7a74836fa29577129e1952d8a77baf89", "score": "0.52200705", "text": "public function hasItemId(){\r\n return $this->_has(11);\r\n }", "title": "" }, { "docid": "c69ce4a14043ccfdbd25d48312789b40", "score": "0.5217291", "text": "function productExists($product_id) {\r\n //use sprintf to make sure that $product_id is inserted into the query as a number - to prevent SQL injection\r\n $sql = sprintf(\"SELECT * FROM product_info WHERE id = %d;\",$_SESSION['product_id']); \r\n return mysql_num_rows(mysql_query($sql)) > 0;\r\n }", "title": "" }, { "docid": "a1bd67c73542a9d1eabc6f500033c3a6", "score": "0.52163386", "text": "public function hasItems(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "befeede4641d8c3f955462c77a7b0304", "score": "0.5197313", "text": "abstract protected function getNonExistentItemId(): string;", "title": "" }, { "docid": "b7209c8d9be8d526e242d6fd818d56e1", "score": "0.5188166", "text": "public function isExist(Product $product) {\n $req=$this->connection->prepare('SELECT EXISTS(SELECT 1 FROM article WHERE id_article=?) AS exist');\n $req->execute( array($product->getId()) );\n $exist=($req->fetch())['exist'];\n return $exist;\n }", "title": "" }, { "docid": "ffeb3dc27768acb9648c5b2ee06c73ce", "score": "0.5185564", "text": "function productExists($product_id) {\n //use sprintf to make sure that $product_id is inserted into the query as a number - to prevent SQL injection\n $sql = sprintf(\"SELECT * FROM php_shop_products WHERE id = %d;\", $product_id);\n \n return pg_num_rows(pg_query($sql)) > 0;\n}", "title": "" }, { "docid": "8fae65f4dfce44c9cba82cf6fbaa4f1f", "score": "0.5185203", "text": "function ItemAtPos($itemkey)\r\n {\r\n if(isset($this->_items[$itemkey]))\r\n return $this->_items[$itemkey];\r\n else\r\n return null;\r\n }", "title": "" }, { "docid": "d07f9cd9f778b805ce9e8b288d923d99", "score": "0.5184657", "text": "public function offsetExists($key) { return array_key_exists($key, $this->items); }", "title": "" }, { "docid": "64d2b347f47503a410661ed043bdbfb5", "score": "0.51833856", "text": "function countItems($item, $table) {\n\n\t\tglobal $con;\n\n\t\t$stmt2 = $con->prepare(\"SELECT COUNT($item) FROM $table\");\n\n\t\t$stmt2->execute();\n\n\t\treturn $stmt2->fetchColumn();\n\n\t}", "title": "" }, { "docid": "8e73a6c6465c2884a4c4a742e33fd77b", "score": "0.5182411", "text": "function CartItemExists($conn, $email, $itemID) {\n\t/** Check if parameters are valid/null */\n\tif(!$conn) mysql_fatal_error(\"Connection cannot be null\");\n\tif($conn->connect_error) mysql_fatal_error($conn->connect_error); // Test connection\n\tif(!$email) mysql_fatal_error(\"Email cannot be null\");\n\tif(!$itemID) mysql_fatal_error(\"Item ID cannot be null\");\n\t/** Perform query */\n\tif(!$stmt = $conn->prepare(\"SELECT * FROM Carts WHERE email=? AND itemID=?;\")) mysql_fatal_error(\"Prepare statement failed: \".$conn->error);\n\tif(!$stmt->bind_param('ss', $email, $itemID)) mysql_fatal_error(\"Binding parameters failed: \".$conn->error); // Bind parameters for sanitization\n\tif(!$stmt->execute()) mysql_fatal_error(\"Execute failed: \".$conn->error); // Execute statement\n\t/** Store result */\n\tif(!$stmt->store_result()) mysql_fatal_error(\"Store result failed : \".$conn->error);\n\t$rowcount = $stmt->num_rows; // Get rowcount\n\t$stmt->close(); // Close statement\n\treturn $rowcount; // Success\n}", "title": "" }, { "docid": "74638818b26a8024a9275922b4bcba26", "score": "0.5181057", "text": "public function has_item($value){\n $items = $this->get_info('player_items');\n if (is_numeric($value)){ return in_array($value, $items) ? true : false; }\n else { return isset($items[$value]) ? true : false; }\n }", "title": "" }, { "docid": "434c6e8088673bf0cedfd5fb9f76b3a7", "score": "0.5179742", "text": "function playlist_item_exists($item_id, $uid = NULL)\n {\n if ($uid)\n {\n $ucond = \" AND userid='$uid' \";\n }\n\n global $db;\n\n $count = $db->count(tbl('playlist_items'), \"playlist_item_id\", \"playlist_item_id='$item_id' $ucond \");\n\n if ($count)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "b0d35441e58d900d024636333c79c45d", "score": "0.51794285", "text": "public static function has($item){\n\n if(!self::$items)\n self::$items = include_once(dirname(__FILE__).'/../config/parameters.php');\n\n return array_key_exists($item, self::$items);\n }", "title": "" }, { "docid": "e062bc6d3b25730a577a4913d2febbe5", "score": "0.5174976", "text": "Public function isProductExistsinLocation($product_id=null,$location_id=null,$code_packaging_level=null) {\n\t\t$answerQuery = $this->db->get_where('inventory_on_hand', array('product_id' => $product_id, 'location_id' => $location_id, 'code_packaging_level' => $code_packaging_level));\n\t\t//print $answerQuery;\n if($answerQuery->num_rows() > 0){\n return true;\n }\n\t\t//return false;\n }", "title": "" }, { "docid": "922ea9c8a40b848f4ac9226413d6a6ed", "score": "0.51582247", "text": "function offsetExists($pos) { return $this->exists($pos);}", "title": "" }, { "docid": "693d660a9421130bde9f5a40db2338be", "score": "0.5143898", "text": "public function itemCount() {\n\t\tif (!isset($this->_item_count)) {\n\t\t\t$this->_item_count = count($this->item_ids);\n\t\t}\n\t\treturn $this->_item_count;\n\t}", "title": "" }, { "docid": "c76339a64c189faaadb479ee4f4ce124", "score": "0.5141307", "text": "public function get_items_count(){\n $items = $this->get_info('player_items');\n return count($items);\n }", "title": "" }, { "docid": "ad1534542b663d4d4efa6a060ae49ad4", "score": "0.51390135", "text": "function item_in_cart($product_id) {\r\n\tif(isset($_SESSION['cart'][$product_id]) and $_SESSION['cart'][$product_id] != 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "title": "" }, { "docid": "f8e729dffa3884d221f5783a102863e6", "score": "0.5137014", "text": "function has_item ($item, $login)\r\n {\r\n # do_mysq\r\n //$login = preg_replace ('/[^a-z_0-9]/i', '', $login);\r\n //$item = preg_replace ('/[^a-z0-9\\._]/i', '', $item);\r\n $q = do_mysql (\"SELECT price FROM items WHERE fullname = '\".$item.\"' AND belongs = '\".$login.\"' AND is_in <> 'ban';\");\r\n if (!mysql_num_rows ($q)) return 0;\r\n else return 1;\r\n }", "title": "" }, { "docid": "610b53abf8cf247003dbe3710b63939e", "score": "0.5134692", "text": "public function hasItems();", "title": "" }, { "docid": "42a8157438356320fa1eab99543b0619", "score": "0.51286054", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM products WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested product (\". $this->id .\") does not exist - possibly the product has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "47ea17dca0a62021173f7f6f46c9c7e9", "score": "0.5124002", "text": "public function count() {\n return count($this->_itemIds);\n }", "title": "" }, { "docid": "cdc91ba783e0932d834236562edd7561", "score": "0.51184237", "text": "function hasItem($name);", "title": "" }, { "docid": "92477d569303a0c1abb44868ead039e9", "score": "0.51091135", "text": "private function getPositionById($id)\n {\n\n $statement = $this->db->prepare('SELECT list.position FROM list WHERE list.id=:id');\n $statement->bindParam(':id', $id);\n $statement->execute();\n\n $position = $statement->fetchColumn();\n\n if ($position === false)\n throw new InvalidArgumentException(\"Item with ID; ${id} doesn't exist\");\n else\n return intval($position);\n }", "title": "" }, { "docid": "b078612986a21645fcc7ac17410ccda1", "score": "0.5104502", "text": "public function getFbInventoryByProductId($productId){\n $inventory = DB::table(\"pabile_inventories\")->where(\"product_id\", $productId)->whereNull(\"order_id\")->count();\n return $inventory;\n }", "title": "" }, { "docid": "927263a036d5cc4450a828753aff94f0", "score": "0.5102964", "text": "public function getItemsCount() {\n\t\treturn count($this->items);\t\n\t}", "title": "" }, { "docid": "525ce94c1d8fe4ea8c303058eab8031c", "score": "0.50998825", "text": "function count_cart_products()\n{\n $cart = $_SESSION[\"cart\"];\n $count = count($cart);\n\n if ($count == 1) {\n echo $count . \" \" . \"product\";\n } else {\n echo $count . \" \" . \"products\";\n }\n}", "title": "" }, { "docid": "012231066812e301954c50e44dd6d16f", "score": "0.50967544", "text": "function get_cart_quantity_for($product_id) {\r\n\tif(isset($_SESSION['cart'][$product_id]) and $_SESSION['cart'][$product_id] != 0)\r\n\t\treturn $_SESSION['cart'][$product_id];\r\n\telse\r\n\t\treturn 0;\r\n}", "title": "" }, { "docid": "7072436e1fea362fe873f3ccd78a9941", "score": "0.5081129", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM products WHERE id='\". $this->obj_productform->productid .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested product (\". $this->obj_productform->productid .\") does not exist - possibly the product has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "f7090129f1f77819bcb4490064ab7670", "score": "0.5080363", "text": "public function getItemCount() {\n return count($this->items);\n }", "title": "" }, { "docid": "e5cae989102a44844c662c42d537f5b8", "score": "0.50743663", "text": "public function getFirstItemOnPage(): ?int;", "title": "" }, { "docid": "23bd531999696d47c6b319fd28b976be", "score": "0.50713915", "text": "public function productExists($name){\r\n $database = Database::getInstance();\r\n $name = $database->escape_value($name);\r\n $sql = \"SELECT * FROM \" . self::$table_name;\r\n $sql .= \" WHERE name= '{$name}' ;\";\r\n\r\n $result_array = self::find_by_sql($sql);\r\n \r\n return !empty($result_array) ? array_shift($result_array) : false;\r\n }", "title": "" }, { "docid": "4d88a95790cd429ce6f306a36c27fe19", "score": "0.50695544", "text": "public function is_item($words){\n $words_in=array();\n foreach($words as $word){\n $words_in[]=\"'\".$word.\"'\"; \n }\n $words = implode(\",\",$words_in);\n $sql = \"SELECT * from item_types WHERE name IN ($words)\";\n $item_type = $this->db->query($sql);\n \n if (count($item_type)==0)\n return false;\n return $item_type[0];\n }", "title": "" }, { "docid": "b80019b75223a2c046673ff6ea4eb8b5", "score": "0.5062202", "text": "public function checkShipment($items){ \n if(!is_array($items)){ \n return 0;\n } \n foreach($items as $item_id => $qty){\n $item = Mage::getModel('sales/order_item')->load($item_id);\n $product_id = $item->getProductId();\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);\n $manageStock = $stockItem->getManageStock();\n if ($stockItem->getUseConfigManageStock()) {\n $manageStock = Mage::getStoreConfig('cataloginventory/item_options/manage_stock', Mage::app()->getStore()->getStoreId());\n }\n if (!$manageStock) {\n continue;\n }\n if (in_array($item->getProductType(), array('configurable', 'bundle', 'grouped', 'virtual', 'downloadable')))\n continue;\n \n if($this->selectWarehouseToShip($product_id,$qty) == 0){ \n return 0;\n };\n }\n return 1;\n }", "title": "" }, { "docid": "222c8b92dc58cf6aee943a3fe67667d6", "score": "0.50593495", "text": "public function insert($item = array()){\n if(!is_array($item) OR count($item) === 0){\n return FALSE;\n }else{\n if(!isset($item['id'], $item['name'], $item['price'], $item['qty'])){\n return FALSE;\n }else{\n \n // het aantal wordt ingevoerd\n $item['qty'] = (float) $item['qty'];\n if($item['qty'] == 0){\n return FALSE;\n }\n // de prijs wordt ingevoerd\n $item['price'] = (float) $item['price'];\n // maakt een unieke identifier aan vaan in de winkelwagen\n $rowid = md5($item['id']);\n $old_qty = isset($this->cart_contents[$rowid]['qty']) ? (int) $this->cart_contents[$rowid]['qty'] : 0;\n $item['rowid'] = $rowid;\n $item['qty'] += $old_qty;\n $this->cart_contents[$rowid] = $item;\n \n // save Cart Item\n if($this->save_cart()){\n return isset($rowid) ? $rowid : TRUE;\n }else{\n return FALSE;\n }\n }\n }\n }", "title": "" }, { "docid": "2dc307d8ebd585e4034a47738be01957", "score": "0.5054077", "text": "public function countExists($item_name){\n\t\t$q = \"SELECT * FROM {$this->countTable} WHERE `item_name` = '{$item_name}'\";\n\t\t$r = mysql_query($q);\n\t\tif(mysql_num_rows($r)>0){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8e70d8289810b74c85374cb585db4074", "score": "0.5048591", "text": "public function hasItems(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "530f0e36e15d8e3f13efbb5c9c00a6d3", "score": "0.5046074", "text": "public function count(): int\n {\n return \\count($this->itemList);\n }", "title": "" }, { "docid": "4cfcd478844a8f6cb3b8e2b6e56029fd", "score": "0.50396234", "text": "public static function getItemsCount($item = null)\n\t{\n\t\tif (!$item || !UsersHelper::isAdmin())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get db\n\t\t$db = Factory::getDb();\n\t\t$query = $db->getQuery(true);\n\n\t\t//query\n\t\t$query->select('count(*)');\n\t\t$query->from('#__' . $item);\n\n\t\t//return results\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadResult();\n\t}", "title": "" }, { "docid": "6ec7cd7d0ca452a10bfd3b18322c92ed", "score": "0.5039102", "text": "function checkItemQuantity($destin_id, $pdo){\n\t\t$stmt = $pdo->prepare(\"SELECT quantity from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $quantity = $stmt->fetchAll();\n\t\tif($quantity[0][\"quantity\"] > 0){\n\t\t\treturn true;\n\t\t}else return false;\n\t}", "title": "" }, { "docid": "dfaeb058a9996b9595f8a10d1aa3bfdb", "score": "0.50371873", "text": "public function item_exists() {\n if ( ! isset( $this->data['fields'] ) ) {\n return false;\n }\n\n return ! empty( $this->data['fields']['id'] );\n }", "title": "" }, { "docid": "93233d66178173f39a1ccf54a094883c", "score": "0.5032981", "text": "public function getItemCount($items);", "title": "" }, { "docid": "97cfddafa9ee6e70611591a31e3316b5", "score": "0.5028767", "text": "function countItems();", "title": "" }, { "docid": "5d6d8868f3579be164db105c6341f938", "score": "0.50277036", "text": "public function insert($item = []){\n\t\t\tif (!is_array($item) or count($item) === 0){\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tif (!isset($item['id'], $item['name'], $item['qty'])){\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Insert Item\n\t\t\t\t\t */\n\t\t\t\t\t// prep the quantity\n\t\t\t\t\t$item['qty'] = (float) $item['qty'];\n\t\t\t\t\tif ($item['qty'] == 0){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// create a unique identifier for the item being inserted into the cart\n\t\t\t\t\t$rowid = md5($item['id']);\n\t\t\t\t\t// get quantity if it's already there and add it on\n\t\t\t\t\t$old_qty = isset($this -> cart_contents[$rowid]['qty'])? (int) $this -> cart_contents[$rowid]['qty']: 0;\n\t\t\t\t\t// re-create the entry with unique identifier and updated quantity\n\t\t\t\t\t$item['rowid'] = $rowid;\n\t\t\t\t\t$item['qty'] += $old_qty;\n\t\t\t\t\t$this -> cart_contents[$rowid] = $item;\n\n\t\t\t\t\t// save Cart Item\n\t\t\t\t\tif ($this -> save_cart()){\n\t\t\t\t\t\treturn isset($rowid)? $rowid: true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d740468717d476bbdf1d79274549af59", "score": "0.5026911", "text": "static function cartItem()\n {\n $userId = Session::get('user')['id'];\n return Cart::where('user_id', $userId)->count();\n }", "title": "" }, { "docid": "2c63f41563b34022f2779211d896e824", "score": "0.5026203", "text": "Public function isProductExistsinLocationOverallGlobalInventoryInHand($product_id=null,$location_id=null,$code_packaging_level=null,$userId=null) {\n\t\t$answerQuery = $this->db->get_where('overall_global_inventory_in_hand', array('product_id' => $product_id, 'location_id' => $location_id, 'code_packaging_level' => $code_packaging_level, 'created_by_id' => $userId, 'inventory_date' => date(\"Y-m-d\")));\n\t\t//print $answerQuery;\n if($answerQuery->num_rows() > 0){\n return true;\n }\n\t\t//return false;\n }", "title": "" }, { "docid": "c11f32033bd05f70b75bba8917a6b3af", "score": "0.50242156", "text": "protected function item_count() {\n\t\treturn $this->items->count_all();\n\t}", "title": "" }, { "docid": "85cc0cfb7987f5414af0accee7894cc9", "score": "0.50219756", "text": "function exists($item_id)\n\t{\n\t\t$this->con->from('items')->where('item_id', $item_id);\n\t\t$query = $this->con->get();\n\n\t\treturn ($query->num_rows()==1);\n\t}", "title": "" }, { "docid": "4b9a6004aa440b11ffe0edeac9f2d6b5", "score": "0.5014462", "text": "private function exists(Package $package) {\n\n foreach($this as $i => $childPackage) {\n if($childPackage === $package) {\n return $i;\n }\n }\n return false;\n }", "title": "" }, { "docid": "c6170fa17c549e625a1a720401c09412", "score": "0.5007317", "text": "public function existItem(T $a): bool;", "title": "" }, { "docid": "1c9e045a3a34564701caf4b8ebe5a237", "score": "0.50030637", "text": "public function count(){\n return count($this->items);\n }", "title": "" }, { "docid": "484ca1d3c71e3779b10a50dc459e0475", "score": "0.49942794", "text": "public function countItems()\n {\n if (!isset($this->arrCache['countItems'])) {\n $this->arrCache['countItems'] = ProductCollectionItem::countBy('pid', (int) $this->id);\n }\n\n return $this->arrCache['countItems'];\n }", "title": "" }, { "docid": "5f5d4c71fe9adae2906020aecdc4c88e", "score": "0.49924248", "text": "public function checkIfItemExists($item)\n {\n return Cart::where('item_id', $item->id)\n ->where('is_checkedout', true)\n ->exists();\n }", "title": "" }, { "docid": "e122e17888257877b6683fad1c539f32", "score": "0.49897587", "text": "abstract protected function getExistingItemId(): string;", "title": "" } ]
514b245bbea54b68fcd2c3d5365f78c8
Adds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user. Gmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators. Note that a delegate user must be referred to by their primary email address, and not an email alias. Also note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. This method is only available to service account clients that have been delegated domainwide authority. (delegates.create)
[ { "docid": "9bdf4c082d1556110d1fb64f26c04664", "score": "0.4925558", "text": "public function create($userId, Delegate $postBody, $optParams = [])\n {\n $params = ['userId' => $userId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Delegate::class);\n }", "title": "" } ]
[ { "docid": "75344a4ba96b58776058e713f6fcba4e", "score": "0.6018199", "text": "public function addDelegations() {\n $manager = $this->input->post('manager_id', TRUE);\n $delegate = $this->input->post('delegate_id', TRUE);\n if (($this->user_id != $manager) && ($this->is_hr === FALSE)) {\n $this->output->set_header(\"HTTP/1.1 403 Forbidden\");\n } else {\n if (isset($manager) && isset($delegate)) {\n $this->output->set_content_type('text/plain');\n $this->load->model('delegations_model');\n if (!$this->delegations_model->isDelegateOfManager($delegate, $manager)) {\n $id = $this->delegations_model->addDelegate($manager, $delegate);\n echo $id;\n } else {\n echo 'null';\n }\n } else {\n $this->output->set_header(\"HTTP/1.1 422 Unprocessable entity\");\n }\n }\n }", "title": "" }, { "docid": "9cf8e67c1f59179d8ac492392824b526", "score": "0.50856495", "text": "public function setDelegate(Automaton\\IMachineDelegate $delegate);", "title": "" }, { "docid": "15649ada3f48dd28b279f1dc2d3e9172", "score": "0.48214853", "text": "public function created(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "d8b7cd54977d41226e7ac0d8eff956a3", "score": "0.47904563", "text": "public function setDelegate($delegate)\n { \n $this->delegateMethodHandler = $delegate;\n }", "title": "" }, { "docid": "d715b40538f8a177abdcc75393f14abd", "score": "0.4783393", "text": "public function update(Request $request, Delegate $delegate)\n {\n $delegate->user_intranet = $request->get('user_intranet');\n $delegate->delegate_intranet = $request->get('delegate_intranet');\n $delegate->delegate_notesid = $request->get('delegate_notesid');\n $delegate->save();\n \n return response()->json($delegate);\n }", "title": "" }, { "docid": "a21a56ad246b1e750705034cdcb4b1cf", "score": "0.47503847", "text": "public function testCanCreateRecipients()\n {\n $data['data'] = [\n 'offer_id' => rand(1, 999999),\n 'recipient_id' => rand(1, 999999),\n 'expiration_date' => date('Y-m-d', strtotime( '+'.mt_rand(0,30).' days'))\n ];\n $this->json('POST', \"/voucher/code\", $data)\n ->seeJson([\n 'code' => 200,\n 'status' => true\n ]);\n }", "title": "" }, { "docid": "7df61c6369a0f39740a42582565e6471", "score": "0.46372706", "text": "function friends_add_friend( $initiator_userid, $friend_userid, $force_accept = false ) {\r\n\tglobal $bp;\r\n\r\n\t$friendship = new BP_Friends_Friendship;\r\n\r\n\tif ( (int)$friendship->is_confirmed )\r\n\t\treturn true;\r\n\r\n\t$friendship->initiator_user_id = $initiator_userid;\r\n\t$friendship->friend_user_id = $friend_userid;\r\n\t$friendship->is_confirmed = 0;\r\n\t$friendship->is_limited = 0;\r\n\t$friendship->date_created = bp_core_current_time();\r\n\r\n\tif ( $force_accept )\r\n\t\t$friendship->is_confirmed = 1;\r\n\r\n\tif ( $friendship->save() ) {\r\n\r\n\t\tif ( !$force_accept ) {\r\n\t\t\t// Add the on screen notification\r\n\t\t\tbp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );\r\n\r\n\t\t\t// Send the email notification\r\n\t\t\trequire_once( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' );\r\n\t\t\tfriends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\r\n\t\t\tdo_action( 'friends_friendship_requested', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\t\t} else {\r\n\t\t\tdo_action( 'friends_friendship_accepted', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "c7fc950a3dcc717c1b64ec40c123af09", "score": "0.45640373", "text": "public function createVerification($recipient);", "title": "" }, { "docid": "14962537f3ef957e4bab27e46f8d7b43", "score": "0.45600682", "text": "public function makeAccepted()\n {\n $this->setAttribute('accepted', self::ACCEPTED);\n }", "title": "" }, { "docid": "c7f0743e64c81bf7566b600361cfaa65", "score": "0.44960773", "text": "public function setDelegatedUsers(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Types\\QueryResultType $delegatedUsers)\n {\n $this->delegatedUsers = $delegatedUsers;\n return $this;\n }", "title": "" }, { "docid": "933fc793b21aa73d8321cd3785d28a57", "score": "0.44788104", "text": "public function setDelegate($delegate)\n {\n $this->includeFile('Sonic/App/Delegate.php');\n $this->autoloader($delegate);\n\n $delegate = new $delegate;\n\n if (!$delegate instanceof \\Sonic\\App\\Delegate) {\n throw new \\Exception('app delegate of class ' . get_class($delegate) . ' must be instance of \\Sonic\\App\\Delegate');\n }\n\n $this->_delegate = $delegate;\n $this->_delegate->setApp($this);\n return $this;\n }", "title": "" }, { "docid": "47d90cd046e0ed5932eb5a180656b2f0", "score": "0.44784653", "text": "public function setAcceptedPayments(array $acceptedPayments)\n {\n $this->acceptedPayments = $acceptedPayments;\n return $this;\n }", "title": "" }, { "docid": "2f036b4f73466e1ac6bbe3e4ab5fcb81", "score": "0.44023526", "text": "public function sendPending()\n\t{\n\t\tif ( $this->type === static::REPLY_PENDING )\n\t\t{\n\t\t\t$this->type = static::REPLY_STAFF;\n\t\t\t$this->save();\n\t\t\t\n\t\t\t$defaultRecipients = $this->item()->getDefaultRecipients();\n\t\t\t$this->sendCustomerNotifications( $defaultRecipients['to'], $defaultRecipients['cc'], $defaultRecipients['bcc'] );\n\n\t\t\t$this->sendNotifications();\n\t\t}\n\t}", "title": "" }, { "docid": "25a8acaf514a5272a31a9b4874b609e9", "score": "0.4362195", "text": "function acceptInvite($group, $who) {\n global $manager;\n $manager->addUserToGroup($group->getGroupId(), $who);\n }", "title": "" }, { "docid": "553b7e3328fcdb85ce0bf97fc8b24fb0", "score": "0.43529317", "text": "public function addDelegator($name, $factory)\n {\n $this->configure(['delegators' => [$name => [$factory]]]);\n }", "title": "" }, { "docid": "ad468a986de62b47fd678548c310759d", "score": "0.43143928", "text": "public function addRecipient(Recipient $recipient);", "title": "" }, { "docid": "3d3ca59523e2e749a65f0c58514adb4c", "score": "0.4286347", "text": "public function postInviteUser()\n {\n try {\n execute(new InviteUserCommand(\n array_unique(array_filter((array) Binput::get('emails')))\n ));\n } catch (ValidationException $e) {\n return cachet_redirect('dashboard.team.invite')\n ->withInput(Binput::except('password'))\n ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.invite.failure')))\n ->withErrors($e->getMessageBag());\n }\n\n return cachet_redirect('dashboard.team.invite')\n ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.invite.success')));\n }", "title": "" }, { "docid": "bb9f5e82ab67d9fff797ad1b3c429095", "score": "0.4277822", "text": "public function invite($optional = [])\n {\n return $this->apiCall('post', '/conversations.invite', ['json' => array_merge([\n ], $optional)]);\n }", "title": "" }, { "docid": "850a60c85b69c246facbd021bbe0917e", "score": "0.42725414", "text": "public function accept()\n {\n $flight = $this->flight;\n\n if (Auth::id() === $flight->requestee_id) {\n $this->requestee_accept = Auth::id();\n } else {\n $this->acceptee_accept = Auth::id();\n }\n\n $this->save();\n }", "title": "" }, { "docid": "72790be25fbb68ca6dcbb7ae0cb4e2eb", "score": "0.42665076", "text": "private function _activate_merchant_account_verification(){\n\t\t\t$activation = $this->_get_bank_account_verification_fee();\n\t\t\t\n\t\t\t$role = '';\n\t\t\tif( isset( $this->class_settings['user_details'][ ''.$this->class_settings['user_id'] ][ 'role' ] ) ){\n\t\t\t\t$role = $this->class_settings['user_details'][ ''.$this->class_settings['user_id'] ][ 'role' ];\n\t\t\t}\n\t\t\t\n\t\t\tif( $activation ){\n\t\t\t\t//2. check gen settings for user role\n\t\t\t\tif( $role == 'seller' ){\n\t\t\t\t\t\n\t\t\t\t\t//CREATE NOTIFICATION && //CREATE PENDING TASKS\n\t\t\t\t\t$this->class_settings['notification_data'] = array(\n\t\t\t\t\t\t'title' => 'Verify Your Bank Account',\n\t\t\t\t\t\t'detailed_message' => 'Your don\\'t have a verified bank account, that would enable us send payment to you once your items have been purchased',\n\t\t\t\t\t\t'send_email' => 'no',\n\t\t\t\t\t\t'notification_type' => 'pending_task',\n\t\t\t\t\t\t'target_user_id' => $this->class_settings['user_id'],\n\t\t\t\t\t\t'class_name' => $this->table_name,\n\t\t\t\t\t\t'method_name' => 'bank_account_verified',\n\t\t\t\t\t\t\n\t\t\t\t\t\t'task_status' => 'pending',\n\t\t\t\t\t\t'task_type' => 'system_generated',\n\t\t\t\t\t\t\n\t\t\t\t\t\t'trigger_function' => '?action=site_users&todo=display_user_details',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$notifications = new cNotifications();\n\t\t\t\t\t$notifications->class_settings = $this->class_settings;\n\t\t\t\t\t$notifications->class_settings[ 'action_to_perform' ] = 'add_notification';\n\t\t\t\t\t$notifications->notifications();\n\t\t\t\t\t\n\t\t\t\t\t//Send Verify Bank Account Email\n\t\t\t\t\t/*\n\t\t\t\t\t$this->class_settings['message_type'] = 1;\n\t\t\t\t\t$this->_send_email();\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t//. redirect to activation menu - ACTIVATION MENU + Welcome Message\n\t\t\t\t\treturn '?action=merchant_accounts&todo=bank_account_manager';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c9897f197812b4dae5a89657fdf67de5", "score": "0.4253531", "text": "private function is_delegated(string $name, $delegate): string|null\n {\n if (is_array($delegate)) {\n if ('' != $delegate['prefix']) {\n $name = substr($name, strlen($delegate['prefix']) + 1);\n }\n\n if (in_array($name, $delegate['delegate'])) {\n return $name;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "4becf9354691fe23975ebae9b9ffa1af", "score": "0.42249995", "text": "public static function acceptRejectTeamInviteNotification(User $user, User $captain, $status){\n\t\t$notification = new Notification([\t'type' => 'Other',\n\t\t\t\t\t\t\t\t\t\t\t'data' => json_encode(['user_id' => $user->id]),\n \t\t\t\t\t\t\t\t\t\t'message' => $user->email . \" has \" . $status . \" your team request.\"\n \t]);\n\n\t\t$captain->notifications()->save($notification);\n \t \n \t//Send Team Acceptation Mail\n \tMail::to($captain)->send(new TeamRequestAcceptRejectMail($user, $captain, $status));\n \t\n \treturn true;\n\t}", "title": "" }, { "docid": "aa0229be269a85c236ff207bcee04a07", "score": "0.42236853", "text": "protected function __MemberBuilder($referer, User $user)\n {\n $done = Member::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'referer' => $referer,\n 'user_id' => $user->id,\n ]);\n if ($done) {\n $account = Account::create(['author' => $done->id]);\n if ($account) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "b7b8a1bea0bbc397caccd5b5bb590c2c", "score": "0.4214664", "text": "public function accept()\n {\n return $this->update(['status' => 'accepted']);\n }", "title": "" }, { "docid": "62baa6595622a7eb19ccc437094b28be", "score": "0.42102212", "text": "public function createDelegateInstance(array $configuration = []);", "title": "" }, { "docid": "f80c5967c1b5326925cd125dd81519de", "score": "0.420052", "text": "public function accept_invitation($invitation_code){\n\t\t$inviteArr = $this->Invite->findByUnique_code($invitation_code);\n\t\tif(!empty($inviteArr)){\n\t\t\t$saveData['id'] = $inviteArr['Invite']['id'];\n\t\t\t$saveData['unique_code'] = 'verified';\n\t\t\t$saveData['status'] = '1';\n\t\t\t$this->Invite->save($saveData);\n\t\t}\n\t\t$this->redirect(SITE_PATH);\n\t\texit;\n\t}", "title": "" }, { "docid": "1a94f3204e8818e1337410c93c759cae", "score": "0.4183666", "text": "public function create(Administrator $administrator)\n {\n return Gate::check('manageUsers');\n }", "title": "" }, { "docid": "6a309ea5290464174012adff7d62c97a", "score": "0.4155484", "text": "public function store(Request $request)\n {\n $delegate = new Delegate([\n 'user_intranet' => $request->get('user_intranet'),\n 'delegate_intranet' => $request->get('delegate_intranet'),\n 'delegate_notesid' => $request->get('delegate_notesid')\n ]);\n $delegate->save();\n \n return response()->json($delegate);\n }", "title": "" }, { "docid": "560ee57b305e709d941bdf4fcc722fa3", "score": "0.41512677", "text": "public function accept($name, Google_Service_MyBusiness_AcceptInvitationRequest $postBody, $optParams = array())\n {\n $params = array('name' => $name, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('accept', array($params), Google_Service_MyBusiness_MybusinessEmpty::class);\n }", "title": "" }, { "docid": "9c780c7eeaf5e0a13786c00983524f71", "score": "0.41406643", "text": "public function store()\n {\n $invitation = Invitation::findByCode(request('invitation_code'));\n abort_if($invitation->hasBeenUsed(), 403);\n \n $user = User::where('email', $invitation->email)->first();\n abort_if($user->isNot(auth()->user()), 403);\n\n \t$invitation->update(['user_id' => $user->id]);\n $invitation->workspace->addMember($user);\n\n return redirect(route('tasks.index', $invitation->workspace->id));\n }", "title": "" }, { "docid": "465dd3f2a562a97e9de424d60f245b46", "score": "0.41379243", "text": "public function accept_invite_() {\n\t\teval(USER);\n\t\t$this->assign('waitSecond',1);\n\n\t\t$cond['team_id'] = $_GET['team'];\n\t\t$cond['user_id'] = session('userid');\n\t\t$data['statecode'] = 1;\n\n\t\ttry {\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\tunset($cond['team_id']);\n\t\t\t$cond['statecode'] = 0;\n\t\t\t$data['statecode'] = -1;\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\t$this->move2state3();\n\n\t\t\t$this->success('','__ROOT__/User/currentstage');\n\t\t}catch(Exception $e){\n\t\t\tthrow_exception($e->getMessage());\n\t\t}\t\n\t}", "title": "" }, { "docid": "7f026219bca3a22b5eb79121353981c5", "score": "0.41370684", "text": "public function deleted(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "1ab2a4131c7aebefabe0e18e08e18fec", "score": "0.41320974", "text": "public function testDelegate()\n {\n $proxy = new SimpleProxy('http://example.com/');\n $response = $proxy->delegate(Request::create('/'));\n $this->assertTrue($response->isOk());\n }", "title": "" }, { "docid": "0a3cae04383f5a50e5f3f9a3970fe562", "score": "0.41111773", "text": "public function deleteDelegations() {\n $manager = $this->input->post('manager_id', TRUE);\n $delegation = $this->input->post('delegation_id', TRUE);\n if (($this->user_id != $manager) && ($this->is_hr == FALSE)) {\n $this->output->set_header(\"HTTP/1.1 403 Forbidden\");\n } else {\n if (isset($manager) && isset($delegation)) {\n $this->output->set_content_type('text/plain');\n $this->load->model('delegations_model');\n $id = $this->delegations_model->deleteDelegation($delegation);\n echo $id;\n } else {\n $this->output->set_header(\"HTTP/1.1 422 Unprocessable entity\");\n }\n }\n }", "title": "" }, { "docid": "ab9361051cdb0339a9527b4162b747f3", "score": "0.40969282", "text": "public function accept() {\n $admin = new Admin();\n $message = new Message();\n\n $is_accepted = $_POST['is_accepted'];\n $id = $_POST['id'];\n\n $message->setMsg('You create task.','success');\n $admin->updateCommentIsAccepted($is_accepted,$id);\n\n Controller::redirect('/admin/comments');\n }", "title": "" }, { "docid": "66dc00122b0bb2d7687fa721ca9faf3b", "score": "0.40826055", "text": "public function addRequester($requester)\n {\n $this->requester[] = $requester;\n return $this;\n }", "title": "" }, { "docid": "11c2173a209124e5259f26c0264256af", "score": "0.40768003", "text": "public function setValueDelegate($valueDelegate);", "title": "" }, { "docid": "e62f2c689fc70b92d0fd5715cf69554e", "score": "0.40760764", "text": "function add_pending_user($email, $name){\n \t// Make sure the user does not already exist in database\n \t$query = $this->db->get_where('users', array('email' => $email));\n\n \tif($query->num_rows() > 0){\n \t\tthrow new RecoverableException(\"A user already exists with this email.\");\n \t}\n\n \t// Add the user\n \t$data = array(\n \t\t'email' => $email,\n \t\t'is_admin' => 0,\n \t\t'name' => $name\n \t);\n \t\n \t$this->db->insert('users', $data);\n \n $user_id = $this->db->insert_id();\n\n return $this->add_registration_hash($user_id);\n }", "title": "" }, { "docid": "954e54ce8e28e534f5e0dae9367209b7", "score": "0.40633643", "text": "public function create(BannedEmailListener $listener)\n {\n $bannedEmail = new BannedEmail();\n $form = $this->presenter->form($bannedEmail);\n\n return $listener->showCreateForm(compact('bannedEmail', 'form'));\n }", "title": "" }, { "docid": "f6d3110dfedf3ea2eacb184497f2d382", "score": "0.40589327", "text": "function add(&$subscriber, $type = null) {\n\t\tglobal $pommo;\n\t\t$dbo =& $pommo->_dbo;\n\t\t$logger =& $pommo->_logger;\n\t\t\n\t\tswitch ($type) {\n\t\t\tcase 'add':\n\t\t\tcase 'del':\n\t\t\tcase 'change':\n\t\t\tcase 'password':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$logger->addErr('Unknown type passed to PommoPending::add');\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$p = array(\n\t\t\t'subscriber_id' => $subscriber['id'],\n\t\t\t'type' => $type,\n\t\t\t'code' => PommoHelper::makeCode(),\n\t\t\t'array' => ($type == 'change') ?\n\t\t\t\t$subscriber : array()\n\t\t\t);\n\t\t\t\n\t\t$pending = PommoPending::make($p);\n\t\t\n\t\tif (!PommoPending::validate($pending)) {\n\t\t\t$logger->addErr('PommoPending::add() failed validation');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!empty($pending['array']))\n\t\t\t$pending['array'] = serialize($pending['array']);\n\t\t\n\t\t// check for pre-existing pending request\n\t\tif (PommoPending::isPending($pending['subscriber_id']))\n\t\t\treturn false;\n\t\t\t\n\t\t$query = \"\n\t\t\tINSERT INTO \".$dbo->table['subscriber_pending'].\"\n\t\t\tSET\n\t\t\t\t[pending_array='%S',]\n\t\t\t\tsubscriber_id=%i,\n\t\t\t\tpending_type='%s',\n\t\t\t\tpending_code='%s'\";\n\t\t$query = $dbo->prepare($query,array(\n\t\t\t$pending['array'],\n\t\t\t$pending['subscriber_id'],\n\t\t\t$pending['type'],\n\t\t\t$pending['code']));\n\t\t\t\n\t\tif (!$dbo->query($query))\n\t\t\treturn false;\n\t\t\n\t\treturn $pending['code'];\n\t}", "title": "" }, { "docid": "a9374472762e23bc55eca4ca3f23c440", "score": "0.4052591", "text": "public function updated(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "c3e228406fbef5ffe316679caeb4f1f4", "score": "0.40498355", "text": "public function accepted()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => Friendship::STATUS_ACCEPTED,\n ];\n });\n }", "title": "" }, { "docid": "7a5a13c852fdbe75cecd675c80e3ed27", "score": "0.40421793", "text": "public function addToAcceptedPayments(\\Devlabs91\\TravelgateNotify\\Models\\Ota\\PaymentFormType $acceptedPayment)\n {\n $this->acceptedPayments[] = $acceptedPayment;\n return $this;\n }", "title": "" }, { "docid": "a6219e4be4eee13116dc083e99659adc", "score": "0.40314233", "text": "public function sendInviteFriends(){\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$user = $this->getLoguedUser();\n\n\t\tif(Referal::where('to', '=', Input::get('to'))->first() != null){\n\t\t\treturn Redirect::route('invite-friends')->with('message', $input['to'] . ' has already been refered.');\n\t\t}\n\t\t\n\t\t$after_message = 'Our portal connects members to contacts and opportunities that drive sales results \n\t \tfor businesses! The first active network! Working actively in our platform \n\t \twill cut down your prospecting process by half the time, thereby \n\t \tincreasing your productivity!\n\t \t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tOur Site: <a href=\"www.leadcliq.com\">www.leadcliq.com</a>\n\t\t\t\t\t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tContact Us: support@leadcliq.com';\n\t\tEmailController::sendMail($input['to'], '', $user->first_name . ' ' . $user->last_name . ': ' . Input::get('subject','Join Me At Leadcliq'), Input::get('message') . $after_message);\n\n\t\t$length = 20;\n\t\t$randomString = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyz\"), 0, $length);\n\n\t\tReferal::create(array(\n\t\t'user_id' => Sentry::getUser()->id,\n\t\t'from' => @$input['from'],\n\t\t'to' => $input['to'],\n\t\t'subject' => @$input['subject'],\n\t\t'message' => @$input['message'],\n\t\t'token' => $randomString,\n\t\t'status' => Referal::$NOT_SIGNED_YET\n\t\t));\n\n\t\treturn Redirect::route('home')->with('message', 'Thanks! Invite as many friends as you want.');\n\t}", "title": "" }, { "docid": "61b3d08193525ffe98781650202a94ce", "score": "0.40276545", "text": "public function acceptedAnswer($value)\n {\n $this->setProperty('acceptedAnswer', $value);\n return $this;\n }", "title": "" }, { "docid": "bcd560bc5c4966d68d9cff82ef63be18", "score": "0.4021126", "text": "Public function add($validator)\n {\n $this->validators[] = $validator;\n }", "title": "" }, { "docid": "412f8daa8c2a96da2c67f6dc0e0fc7be", "score": "0.40081555", "text": "public function addFriend($recipient)\n\t{\n\t\tif(Auth::id() != $recipient->id): \n\t\t\tAuth::user()->befriend($recipient);\n\t\tendif;\n\t}", "title": "" }, { "docid": "7300d992f9b5e7a257ba57809d6fc413", "score": "0.40054592", "text": "public function acceptInvite()\n\t{\n\t\t$headerStringValue = apache_request_headers();\n\t\tif(isset($_POST) && !empty($_POST))\n\t\t{\n\t\t\tif( (!empty($_POST['user_id']) && isset($_POST['user_id'])) && (!empty($headerStringValue['webservice_token'])) && (!empty($_POST['invite_id']) && isset($_POST['invite_id'])) && (!empty($_POST['status']) && isset($_POST['status'])) )\n\t\t\t{\n\t\t\t\t/*inputs for validation */\n\t\t\t\t$webservice_token = $headerStringValue['webservice_token'];\n\t\t\t\t$user_id = $this->input->post(\"user_id\");\n\t\t\t\t$status = $this->input->post(\"status\");\n\t\t\t\t\n\t\t\t\t$validate_data = array(\"user_id\"=>$user_id,\"webservice_token\"=>$webservice_token);\n\t\t\t\t\n\t\t\t\t/*call function for validate user */\n\t\t\t\t$validate = $this->UM->validateWebservice($validate_data);\n\t\t\t\tif($validate['is_valid']==1){\n\t\t\t\t\t\n\t\t\t\t\t$invite_id = $this->input->post(\"invite_id\");\n\t\t\t\t\t$response = $this->FHI->acceptInvite($invite_id,$user_id,$status);\n\t\t\t\t\tif($response)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"1\",\"msg\"=>\"Data Updated\"));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Date not updated try again\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Not valid user\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Invalid Paramater\"));\n\t\t\t}\t\n\t\t}\n\t\telse{\n\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Invalid request\"));\n\t\t}\n\t}", "title": "" }, { "docid": "648817e4c0b610c85789a67de3b0a8c5", "score": "0.39790404", "text": "public function add($requested_id) {\n\t\t$this->check($requested_id);\n\t\t\n\t\tif($this->allowRequest()) {\n\t\t\t// check first for a previous request just to avoid any error later on\n\t\t\t$this->previousRequest();\n\t\t\t\n\t\t\tNotification_Service::origin('Registration', $this->ids['current'])\n\t\t\t\t->destinationId($this->ids['requested'])\n\t\t\t\t->params(['notif_type' => 'friend_request'])\n\t\t\t\t->send();\n\t\t\t\n\t\t\t$this->request->create([\n\t\t\t\t\t'requesting_user_id' => $this->ids['current'],\n\t\t\t\t\t'requested_user_id'\t=> $this->ids['requested'],\n\t\t\t\t\t'status' => 0\n\t\t\t]);\n\t\t\treturn true;\n\t\t}\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "62c247950baec17098911769b3371ae5", "score": "0.39787632", "text": "function sendWelcomeAndVerificationEmails($userEmailAddress) {\r\n\r\n\t//Verify a user email address was passed. If not, return NULL.\r\n\tif (!$userEmailAddress) {return NULL;}\r\n\t\r\n\t//Get the user. If not found, return NULL.\r\n\tif (!($newUser = User::getUserByEmailAddress($userEmailAddress))) {return NULL;}\r\n\r\n\t//Get the user's client\r\n\t$newUserClient = Client::getClient($newUser->getClientID());\r\n\r\n\t//---------------------------------- Welcome Email ----------------------------------\r\n\r\n\t//Create the welcome email subject\r\n\t$welcomeEmailSubject = \"AdShotRunner: Thank You for Registering!\"; \r\n\r\n\t//Create the welcome email body\r\n\t$welcomeEmailBody = $newUser->getFirstName() . \" \" . $newUser->getLastName() . \",\\n\\n\";\r\n\t$welcomeEmailBody .= \"Thank you for registering with AdShotRunner. An email has been sent to your Company Administrator to request access. In the meantime, find more information at: https://www.adshotrunner.com/ \\n\\n\";\r\n\t$welcomeEmailBody .= \"We look forward to having you on board!\\n\\n\";\r\n\t$welcomeEmailBody .= \"If you believe you received this email in error, you may ignore it. You will receive no future emails.\";\r\n\r\n\t//Set the email addresses\r\n\t$fromEmailAddress = ASRProperties::emailAddressDoNotReply();\r\n\t$toEmailAddress = $newUser->getEmailAddress();\r\n\r\n\t//Send the welcome email\r\n\tEmailClient::sendEmail($fromEmailAddress, $toEmailAddress, $welcomeEmailSubject, $welcomeEmailBody);\r\n\r\n\t//---------------------------------- Verification Email ----------------------------------\r\n\r\n\t//Create the verification code specific for this user.\r\n\t$verificationCode = md5($newUser->getID() . $newUser->getClientID() . $newUser->getEmailAddress());\r\n\r\n\t//Create the subject line for the verification email\r\n\t$verificationSubject = \"AdShotRunner: New User Request (\" . $newUser->getFirstName() . \" \" . $newUser->getLastName() . \")\";\r\n\t\r\n\t//Create the verification email body\r\n\t$verificationBody = \"The following new user has requested access to your AdShotRunner account: \\n\\n\";\r\n\t$verificationBody .= \"Name: \" . $newUser->getFirstName() . \" \" . $newUser->getLastName() . \"\\n\";\r\n\t$verificationBody .= \"Email Address: \" . $newUser->getEmailAddress() . \"\\n\\n\";\r\n\t$verificationBody .= \"If you would like to give this user access to your account, please click the link below or paste it into your browser: \\n\\n\";\r\n\t$verificationBody .= \"http://\" . ASRProperties::asrDomain() . \"/verifyAccount.php?id=\" . $newUser->getID() . \"&v=\" . $verificationCode;\r\n\t$clientVerifyAddress = $newUserClient->getVerifyUserEmailAddress();\r\n\tEmailClient::sendEmail($fromEmailAddress, $clientVerifyAddress, $verificationSubject, $verificationBody);\r\n\r\n\t//Return successful.\r\n\treturn true;\r\n}", "title": "" }, { "docid": "c9509af91d3949b49b388fe6e114b006", "score": "0.3971213", "text": "function startDelegate($fromEID, $toEID) {\n\tglobal $dbh;\n\tglobal $default;\n\t\n\t/* ---------- GET USERS APPROVAL LEVELS ---------- */\n\t$app_sql = \"SELECT controller, one, two, three, four FROM Users WHERE eid='\" . $fromEID . \"'\";\n\t$APP = $dbh->getRow($app_sql);\n\n\t/* ---------- CONTROLLER APPROVER ---------- */\n\tif ($APP['controller'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE controller='\" . $fromEID . \"' AND level IN ('controller')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET controller='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'controller', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- FIRST APPROVER ---------- */\n\tif ($APP['one'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app1='\" . $fromEID . \"' AND level IN ('controller', 'app1')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app1='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app1', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- SECOND APPROVER ---------- */\n\tif ($APP['two'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app2='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app2='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app2', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- THIRD APPROVER ---------- */\n\tif ($APP['three'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app3='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2', 'app3')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app3='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app3', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- FOURTH APPROVER ---------- */\n\tif ($APP['four'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app4='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2', 'app3', 'app4')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app4='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app4', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "d0642612917bfed94859668a840b62ae", "score": "0.39685708", "text": "public function welcome_applicant($v_id,$lease_id,$no_preview=False,$v_status=Null,$bcc=array()){\n\n if ($lease_id != 'status') $lease = loader::getInstance_new('bForm_vm_Lease',$lease_id,array('strict'));\n $this->visit = (empty($lease) || empty($lease->parentForm)\n\t\t ? loader::getInstance_new('bForm_vm_Visit',$v_id,'fatal')\n\t\t : $lease->parentForm);\n\n //\n if (!send_welcomeMail_to_applicants){\n // Check is the visitor subject of getting the \"welcome Email\" \n $case = \"NO WELCOME MAILS configured\";\n }elseif($this->visit->getValue('v_type',1) !== VISIT_TYPE_PROGRAM){\n $case = 'not_VISIT_TYPE_PROGRAM';\n }elseif (!empty($v_status) && ($v_status !== STATUS_YES)){\n // Shortcut to save time\n $case = $v_status;\n }else{\n $name = $this->visit->av->fmtName('fl');\n \n // Catch the refused/pending visits\n if ($this->visit->getValue('v_status',1) !== STATUS_YES) $case = $v_status;\n \n // This mail should not be sent to the local organizers\n if ($this->visit->av->isOrganizer($this->visit->e->ID) && $this->visit->av->isE(True)) $case = 'isOrganizer';\n }\n\n // Exit if the visitor is not concerned\n if (!empty($case)){\n $reply = CONST_not_concerned;\n if (empty($name)) $name = 'visitor';\n $this->dbg(sprintf(\"%s, %s, <em>%s</em>\",var_export($reply,True),$case,$name),True);\n return $reply;\n }\n \n // Is it the status request?\n if ($lease_id === 'status'){\n $this->m_applicant_info_mail($this->visit,'status',False);\n $reply = ($this->visit->getPolicy(VM_V_welcomeMailQueued)\n\t\t? in_queue\n\t\t: $this->visit->getPolicy(VM_V_welcomeMailSent));\n $this->dbg(var_export($reply,True).\" \".x('em',$this->visit->av->fmtName('fl')));\n return $reply;\n }\n\n // This mail to be sent once, but there is no harm to send it again\n if ($no_preview && $this->visit->getPolicy(VM_V_welcomeMailSent) === True){\n $this->dbg(\"Mail to \".$this->visit->av->name().\" was already sent\");\n }\n \n // Put this mail into the execution queue, not waist time in the interactive session\n if (!myPear_taskManager()->exec_request && $no_preview){\n myPear_taskManager()->addTask(get_class($this),__function__,array($this->visit->ID,\n\t\t\t\t\t\t\t\t\t$lease_id,\n\t\t\t\t\t\t\t\t\tTrue,\n\t\t\t\t\t\t\t\t\tNull,\t\n\t\t\t\t\t\t\t\t\t(is_object(bAuth::$av)\n\t\t\t\t\t\t\t\t\t ? array(bAuth::$av->getEmail())\n\t\t\t\t\t\t\t\t\t : array())));\n $this->visit->setPolicy(VM_V_welcomeMailQueued,1);\n return True;\n }elseif (empty($bcc) && is_object(bAuth::$av)){\n $bcc[] = bAuth::$av->getEmail();\n }\n \n /*\n * Accommodation block (not for the local people)\n */\n $this->attachments = array();\n $blabla = array();\n $include_accommodation_in_welcomeMail = (include_accommodation_in_welcomeMail && !empty($lease_id) && $this->visit->hut_codes($without_BI=True));\n $this->dbg(\"include_accommodation_in_welcomeMail=\".var_export($include_accommodation_in_welcomeMail,True),cnf_dev);\n if ($include_accommodation_in_welcomeMail){\n\n // Save attachments\n foreach($this->attachmentFile($this->visit->ID,0,'hotel_confirmation') as $file) $this->attachments[(int)preg_replace('/[a-zA-Z_]*/','',basename($file))] = $file; \n if (!empty($this->attachments)) $this->dbg($this->attachments);\n\n $a = loader::getInstance_new('bForm_vm_Room',$lease->getValue('lease_aid'),array('strict'));\n $a_name = bForm_vm_Room::_a_name($lease->formDB,'for_applicant'); \n if (strpos($a_name,'[Shared] ')) $a_name = str_replace('[Shared] ','',str_replace('Room ','Shared room ',$a_name));\n $billedTo = (empty($a_name)\n\t\t ? array()\n\t\t : array($a_name.'.'));\n\n // Get aaccompaning persons \n $v_accompaning = (($n = $this->visit->getValue('v_accompaning',True))\n\t\t\t? array('',\"You are expected to be accompanied by $n person\".($n>1?'s':'').'.','')\n\t\t\t: array());\n\n // Get cotenants\n $cotenant = (($ct = $this->visit->cotenants())\n\t\t ? array('','You will share the room with ' . join(', ',$ct).'.','')\n\t\t : array());\n if (!empty($cotenant)) $v_accompaning = array();\n \n $blabla[] = '\nACCOMMODATION\n-------------\nYour accommodation will be at '.$a->hut->name().' in '.$a->hut->getValue('hut_city',1).'. '.join(\", \",$billedTo).'\n'.join(\"\\n\",$cotenant).join(\"\\n\",$v_accompaning).'\n'.(stripos($a->hut->name(),'Biz')===False ? '' : 'You will receive a separate confirmation of the room reservation from '.$a->hut->name().'. ').\n'Any changes in dates are subject to availability and should be taken up directly with '.$a->hut->name(). // ', '.myOrg_nameS.' can\\'t help with that '. \n' (see '.$a->hut->getValue('hut_url').' for contact information).\n\nPlease read carefully the cancellation policy. The violation of the cancellation policy will be on Your charge.\n';\n }\n \n \n /*\n * Reimbursement block\n */\n $exp = $this->visit->getExp();\n $VM_V_payTrip = $this->visit->getPolicy(VM_V_payTrip);\n $VM_V_payPerdiem = $this->visit->getPolicy(VM_V_payPerdiem);\n \n $include_payForms_in_welcomeMail = (include_payForms_in_welcomeMail && ($VM_V_payTrip || $VM_V_payPerdiem));\n $this->dbg(\"include_payForms_in_welcomeMail=\".var_export($include_payForms_in_welcomeMail,True),cnf_dev);\n $cc = array();\n if ($include_payForms_in_welcomeMail){\n $cc[] = reimbursement_email;\n foreach(VM::$forms2send as $pdf_tpl){\n\t$attachments_to_sign = True;\n\t$this->attachments[] = $exp->pdfReceipt($pdf_tpl,sys_get_temp_dir() . \"/${pdf_tpl}_\" . $this->visit->ID . '.pdf');\n }\n }\n \n $pd = array();\n $this->dbg(\"VM_V_payTrip=\".var_export($VM_V_payTrip,True),cnf_dev);\n if ($VM_V_payTrip){\n $trip = $exp->getValue('exp_travel_est', True);\n $pay[] = 'contribute up to '.b_fmt::money($trip).' Swedish Crowns towards the cost of your return travel to '.myOrg_name;\n }\n \n $this->dbg(\"VM_V_payPerdiem=\".var_export($VM_V_payPerdiem,True),cnf_dev);\n if ($VM_V_payPerdiem){\n $perdiem = $exp->getValue('exp_perdiem_est',True);\n $pay[] = 'provide a '.VM_wordPerdiem.' of '.b_fmt::money($perdiem).' Swedish Crowns towards local expenses';\n $pd = array('','If you are receiving a '.VM_wordPerdiem.' the signed forms need to be received by us three weeks in advance of your visit.');\n } \n \n if (!empty($pay)){\n $blabla[] = '\nREIMBURSEMENT\n-------------\nWe will '.join(\" and \",$pay).'.\n\n';\n if (!empty($attachments_to_sign)) $blabla[] = \"For this we need you to fill the attached forms.\n\nPlease provide your name, home address, date of birth, the dates that you are traveling, and the date of your PhD (the last item is required by local university regulations).\n\nIt is important to fill in the bank information also, with name and address of the bank, IBAN number, and Swift code. Otherwise the money transfer for your reimbursement cannot be issued.\n\nBring the forms together with copies of your tickets to the Nordita administration. You can also mail it to reimbursement@nordita.org .\n\".join(\"\\n\",$pd);\n }\n \n \n //\n // personal web site\n //\n $this->dbg(\"include_personalPage_in_welcomeMail=\".var_export(include_personalPage_in_welcomeMail,True),cnf_dev);\n if (include_personalPage_in_welcomeMail){\n if (!$this->visit->av->isE(True)) $blabla[] = '\nPERSONAL WEB PAGE\n-----------------\nWe have created a web page for you which you can access here:\n{login_url}\n\nPlease use this page to update your contact information. We also ask for the following:\n- your birth date (needed for registration of wireless Internet access),\n- a photograph of yourself so that we, and your fellow participants, can put a face together with your name.\n\nVia your personal page you obtain more information about the event, including photos and dates of stay of other participants.';\n if (!empty($pay)) $blabla[] = '\nNote, that the forms for the reimbursement get your personal information, like the address, affiliation, email, etc. from (naively saying) \"your web page\". Please check that your record is correct.'; \n }\n \n //\n // Gather all the pieces...\n //\n $messageBody = 'Dear '.$this->visit->av->fmtName('sfl',0).',\n \n'.(is_object($this->visit->e)\n ?'This is to confirm that your application for the upcoming '.myOrg_name.' Event \"'.$this->visit->e->name(False).'\" which takes place '.b_time::period($this->visit->e->getValue('e_start',1),$this->visit->getValue('e_end',1),'h').' has been accepted.\n\nWe look forward '.($this->visit->av->isE(True) ? '' : 'to seeing you at '.myOrg_name).' and hope you will have a pleasant and productive meeting.\n'.($this->visit->av->isE(True) ? '' : 'For directions to '.myOrg_name.\", see http://www.nordita.org/map\\n\")\n .join(\"\\n\",$blabla).'\n\nSincerely,\nOrganizing committee for \"'.$this->visit->e->name(False).'\".'\n :'');\n \n // Show or not the button \"send email\" in the preview mode\n $this->tooLateForEmail = VM_tooLateForEmail($this->visit,$this->visit->e,True);\n\n // Now send the mail\n if ($ok = $this->send(array($this->visit->av,\n\t\t\t\tarray('q'=>sprintf(\"%s/%s/\",VM_MODULE,APImenu::tab_code(tab_vm_home))),\n\t\t\t\tFalse),\n\t\t\t $this->visit->av->getEmail(),\n\t\t\t (is_object($this->visit->e)?$this->visit->e->name():'Your visit to '.myOrg_name),\n\t\t\t $messageBody,\n\t\t\t $syslog_thisMail=True,\n\t\t\t $no_preview,\n\t\t\t $cc,\n\t\t\t $bcc)){\n $this->visit->setPolicy(VM_V_welcomeMailSent,1,True,True);\n $this->visit->setPolicy(VM_V_welcomeMailQueued,0);\n $this->m_applicant_info_mail($this->visit,'status',False);\n MSG::MESSAGE(sprintf('Confirmation mail is sent to %s',$this->visit->av->name()));\n }\n $this->dbg('Mail to '.$this->visit->av->fmtName('fl').' is '.($ok ? 'OK' : 'NOT sent ...'),cnf_dev);\n return $ok;\n }", "title": "" }, { "docid": "97dd4a52a23911b86444b451d92ae572", "score": "0.39640984", "text": "public function add_friend($user_requested_id)\n {\n if($this->id === $user_requested_id)\n {\n return 0;\n }\n\n //if they are already friends\n if($this->is_friends_with($user_requested_id) === 1)\n {\n return \"already friends\";\n }\n\n\n if($this->has_pending_request_sent_to($user_requested_id) === 1)\n {\n return \"Friend request sent already!\";\n }\n if($this->has_pending_request_from($user_requested_id) === 1)\n {\n return $this->accept_friend($user_requested_id);\n }\n\n $friendship = Friendship::create([\n 'requester' => $this->id,\n 'user_requested' => $user_requested_id\n ]);\n\n if($friendship)\n {\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "04ce0e60880a61369400d107884e3413", "score": "0.39625907", "text": "public function destroy(Delegate $delegate)\n {\n $delegate->delete();\n return response()->json(['message' => 'Delegate deleted']);\n }", "title": "" }, { "docid": "b68a8f189864fdfb7b390b55348b338c", "score": "0.3958169", "text": "public function addVerification(User $user)\n\t{\n\t\t$this->verified = 1;\n\t\t$this->verified_user_id = $user->id;\n\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "913f1bc6780396a683a7173348d611a0", "score": "0.39581028", "text": "public function add(\n string $code,\n string $userLpaActorToken,\n string $siriusUid,\n DateTime $expires,\n string $organisation,\n ?int $actorId\n );", "title": "" }, { "docid": "a22fccf630beceb77e9df089422a4374", "score": "0.3944279", "text": "public function accept($id)\n {\n \t// set the gateman id\n \t$gateman_id = $this->user->id;\n\n \t// retrieve the request\n $gateman = Gateman::find($id);\n\n\t\t// check for the existence of the request on the db\n if (!$gateman) {\n return response()->json(['status' => false, 'message' => 'Request not found!'], 404);\n } else {\n\t // ensure that only the right gateman can accept the request\n\t if ($gateman->gateman_id != $gateman_id) {\n\t return response()->json(['status' => false, 'message' => 'Access denied'], 401);\n\t }\n\n \t// check if the request has not been accepted\n \t$request = $gateman->where('id', $id)\n \t\t->where('gateman_id', $gateman_id)\n \t\t->where('request_status', 0)\n \t\t->exists();\n\n \t// update the request\n \tif ($request) {\n \t\t$gateman->request_status = 1;\n\n \t\tif ($gateman->save()) {\n // Send the resident a notification informing them\n // of the acceptance\n $resident = User::find($gateman['user_id']);\n $user = User::find($gateman_id);\n \t\t $resident->notify(new GatemanAcceptanceNotification($resident, $user));\n\t\t\t return response()->json([\n\t\t\t \t'message' => 'The request has been accepted successfully',\n\t\t\t \t'status' => true,\n\t\t\t \t'resident_gateman' => $gateman\n\t\t\t ], 202);\n \t\t} else {\n\t\t\t return response()->json([\n\t\t\t \t'message' => 'The request could not be accepted at the moment',\n\t\t\t \t'status' => false\n\t\t\t ], 500);\n\t\t\t\t}\n \t} else {\n\t\t return response()->json([\n\t\t \t'message' => 'This request has already been accepted',\n\t\t \t'status' => true\n\t\t ], 200);\n \t}\n }\n }", "title": "" }, { "docid": "aa132e206e5b3b6431d2804c09dbc213", "score": "0.39403385", "text": "protected function create_interface_flex_gateway_fee($batch_id, $status, $dto_obj)\n\t{\n\t\t$ifgf_dao = $this->get_ifgf_dao();\n\t\t$ifgf_obj = $ifgf_dao->get();\n\n\t\t$ifgf_obj->set_flex_batch_id($batch_id);\n\t\t$ifgf_obj->set_gateway_id($this->get_pmgw());\n\t\t$ifgf_obj->set_txn_id($dto_obj->get_ref_txn_id());\n\t\t$ifgf_obj->set_txn_time($dto_obj->get_date());\n\t\t$ifgf_obj->set_currency_id($dto_obj->get_currency_id());\n\t\t$ifgf_obj->set_amount(ereg_replace(\",\", \"\", $dto_obj->get_amount()));\n\t\t$ifgf_obj->set_status($status);\n\t\t$ifgf_obj->set_batch_status(\"N\");\n\t\t$result = $ifgf_dao->insert($ifgf_obj);\n\n\t\t//var_dump($ifgf_dao->db->last_query());die();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "65ab010bd5edfb40f577ac64cc5fcfdf", "score": "0.39268827", "text": "public function index(DelegateDataTable $delegate)\n {\n\n return $delegate->render('admin.delegates.index', ['title'=> trans('admin.delegates')]);\n }", "title": "" }, { "docid": "27f36db6df899e6e0ec3b56f78dd22c0", "score": "0.39221337", "text": "public function save(Validator $validator, $notRequiredActivation = false)\n {\n\n $errors = $this->validate($validator);\n\n if (empty($errors)) {\n $password_hash = password_hash($this->password, PASSWORD_DEFAULT);\n\n $token = new Token();\n $this->activation_hash = $token->getHash();\n\n if ($notRequiredActivation) {\n $sql = 'INSERT INTO users (name, email, password_hash, permission, join_date, is_active) VALUES (:name, :email, :password_hash, :permission, :join_date, 1)';\n\n } else {\n $sql = 'INSERT INTO users (name, email, password_hash, ip, join_date, activation_hash) VALUES (:name, :email, :password_hash, :ip, :join_date, :activation_hash)';\n\n }\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':name', $this->name, PDO::PARAM_STR);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n $stmt->bindValue(':password_hash', $password_hash, PDO::PARAM_STR);\n $stmt->bindValue(':join_date', date('Y-m-d H:i:s', time()), PDO::PARAM_STR);\n\n if (!$notRequiredActivation){\n $stmt->bindValue(':activation_hash', $this->activation_hash, PDO::PARAM_STR);\n $stmt->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);\n\n } else {\n $stmt->bindValue(':permission', $this->permission);\n }\n\n return $stmt->execute();\n }\n\n return false;\n }", "title": "" }, { "docid": "d125feba27594dba1212119cc9c4a294", "score": "0.39164847", "text": "public function addValidator(callable $validator)\n {\n // TODO: Implement addValidator() method.\n }", "title": "" }, { "docid": "2b2557d94aebff586cabcf1cedf8942d", "score": "0.3908915", "text": "public function add() {\n\t\t\n\t\t$result = $this->Api->Resource\n\t\t\t->forModel('User')\n\t\t\t->withId(0)\n\t\t\t->withData($this->request->data)\n\t\t\t->save();\n\n\t\tif (empty($result)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->Api->setResponseCode(2000);\n\t\t\n\t\t$this->Api->specialViewVars(array(\n\t\t\t'developerMessage' => 'The user was successfully created. To view and/or act as the user, ' .\n\t\t\t\t\t\t\t\t\t'you must authenticate and retrieve an access token.'\n\t\t));\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "c3469e8e592343aca14aef81fc23e6de", "score": "0.39061296", "text": "public function markEmailAsVerified()\n {\n return $this->forceFill([\n 'email_verified_at' => $this->freshTimestamp(),\n 'member_email_bind' => 1,\n ])->save();\n }", "title": "" }, { "docid": "a1f98f5ba0207ba07c65d534c69add8f", "score": "0.39035714", "text": "public function makeNotAccepted()\n {\n $this->setAttribute('accepted', self::NOT_ACCEPTED);\n }", "title": "" }, { "docid": "6c4b84c8ff2648b865db6a023503545c", "score": "0.3898443", "text": "public function create(CreateUserVerificationDTO $details)\r\n {\r\n $details = json_decode(json_encode($details), true);\r\n $res = $this->userVerifyModel->create($details);\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "9e010efa412b8b316eb073968af1a2a4", "score": "0.38952088", "text": "public function addAttendee(UserInterface $attendee);", "title": "" }, { "docid": "621d498b77dee0c72451c163dc532a45", "score": "0.38869256", "text": "public function post_invite_usage() {\n\t\t\n\t}", "title": "" }, { "docid": "3a9c5ef990f7a7cf414d66c2b296f9be", "score": "0.38863087", "text": "public function triggerSubscribe($delegate, $method, &$one = null, &$two = null, &$three = null, &$four = null)\n {\n $objectHash = spl_object_hash($delegate);\n $return = null;\n if (isset($this->delegates[$objectHash])) {\n foreach ($this->delegates[$objectHash] as $target) {\n $return = $target->$method($one, $two, $three, $four);\n if ($return === false) {\n break;\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "6c909e8c34b1742a864eb28ca86c9bb4", "score": "0.38857737", "text": "public function store(UserInviteRequest $request)\n {\n $d = $request->all();\n $d['role'] = $request->get('is_admin') === true ? 'admin' : 'user';\n $u = UserInvite::create($d);\n if(MegaHelpers::getSettingsEmail()->type !== 'manual')\n {\n Mail::to($u)->queue(new Invitation($u));\n }\n return response()->json($u);\n }", "title": "" }, { "docid": "0ac2394341609173981ebebaa70d4995", "score": "0.38777512", "text": "public function postCreate()\n\t{\n\t\t$item = $this->item();\n\t\t\n\t\tif ( $this->type === Reply::REPLY_MEMBER or $this->type === Reply::REPLY_ALTCONTACT )\n\t\t{\n\t\t\t$item->status = Status::load( TRUE, 'status_default_member' );\n\t\t}\n\t\t\n\t\treturn parent::postCreate();\n\t}", "title": "" }, { "docid": "77884b69695bfefe3ba6c05c499ab0de", "score": "0.38774154", "text": "public function actionNewInvite()\n\t{\n\t\tif( !Yii::app()->params['anonInvites'] )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'Anonymous invitations are not enabled.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\t$cnt = $this->getCodesLeft();\n\t\tif( $cnt <= 0 )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'There are no anonymous invitations left, '.\n\t\t\t\t\t'wait a day and try again.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif( Yii::app()->db->createCommand('SELECT count(*) AS count FROM invitation_code WHERE senderid IS NULL AND created>=(now()-INTERVAL \\'30 min\\')')->query()->readAll()[0]['count'] > 0 )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'There are no anonymous invitations left, '.\n\t\t\t\t\t'wait an hour and try again.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$invite = new InvitationCode;\n\t\t$invite->senderid = NULL;\n\t\t$src = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\tdo\n\t\t{\n\t\t\t$invite->code = '';\n\t\t\tfor( $j = 0; $j < 16; $j++ )\n\t\t\t{\n\t\t\t\t$invite->code .= $src[mt_rand(0,61)];\n\t\t\t}\n\t\t} while( !$invite->save() );\n\t\tprint json_encode(array('code'=>$invite->code, 'count'=>max(0,$cnt-1)));\n\t}", "title": "" }, { "docid": "628840e9fd95ba141c817dd14d5e6307", "score": "0.38773882", "text": "public function respondRequest(int $userID, int $friendID, bool $accept) : bool {\n\t\t//If the request is to refuse friendship request, there isn't any security check to perform\n\t\tif(!$accept){\n\t\t\t//Perform a request on the database\n\t\t\t$conditions = \"ID_personne = ? AND ID_amis = ? AND actif = 0\";\n\t\t\t$conditionsValues = array(\n\t\t\t\t$userID*1,\n\t\t\t\t$friendID*1\n\t\t\t);\n\n\t\t\t//Try to perform request\n\t\t\tif(CS::get()->db->deleteEntry($this->friendsTable, $conditions, $conditionsValues))\n\t\t\t\treturn true; //Operation is a success\n\t\t\telse\n\t\t\t\treturn false; //An error occured\n\t\t}\n\n\t\t//Else it is a little more complicated\n\t\t//First, check the request was really performed\n\t\tif(!$this->checkFriendShipRequestExistence($friendID, $userID))\n\t\t\treturn false; //There isn't any existing request\n\t\t\n\t\t//Else we can update the database to accept the request\n\t\t//Update the table\n\t\t$conditions = \"ID_personne = ? AND ID_amis = ? AND actif = 0\";\n\t\t$whereValues = array(\n\t\t\t$userID*1,\n\t\t\t$friendID*1\n\t\t);\n\t\t$modifs = array(\n\t\t\t\"actif\" => 1\n\t\t);\n\n\t\t//First update the table\n\t\tif(!CS::get()->db->updateDB($this->friendsTable, $conditions, $modifs, $whereValues))\n\t\t\treturn false;\n\n\t\t//Then insert the second friend line\n\t\t$insertValues = array(\n\t\t\t\"ID_personne\" => $friendID,\n\t\t\t\"ID_amis\" => $userID,\n\t\t\t\"actif\" => 1\n\t\t);\n\t\tif(!CS::get()->db->addLine($this->friendsTable, $insertValues))\n\t\t\treturn false; //An error occurred\n\t\t\n\t\t//The operation is a success\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d3572da80b02add442e5db2565c3edde", "score": "0.38759387", "text": "public function create(Authenticatable $user)\n {\n $token = $this->token->create($user);\n\n $notification = $this->config->getNotification('verify_email');\n\n $user->notify(new $notification($token));\n }", "title": "" }, { "docid": "c681b11c59fb363b09e2d26297492057", "score": "0.38759345", "text": "function queue_invite($challenge_id,$group_id,$user_id=NULL,$fname=NULL,$lname=NULL,$email=NULL,$type=NULL){\n\t\t$this->checkAuth();\n\t\t$invite_token = sha1(time().$this->salt);\n\t\t\n\t\t// check for existing user. if new user, create user record\n\t\tif(!$user_id){\n\t\t\t$user = $this->User->findByEmail($email);\n\t\t\tif(!$user){\n\t\t\t\t$this->User->id = NULL;\n\t\t\t\t$new_user = array(\t'User' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\t'invite_token'\t=> $invite_token,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'firstname'\t\t\t=> $fname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'lastname'\t\t\t=> $lname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'login'\t\t\t\t\t=> $email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'email'\t\t\t\t\t=> $email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'user_type'\t\t\t=> $type ));\n\t\t\t\t$this->User->save($new_user);\n\t\t\t\t\n\t\t\t\t$status = array(\t'Status' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\t'user_id'\t\t\t\t=> $this->User->id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'challenge_id'\t=> $challenge_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t=> 'P' ));\n\t\t\t\t$this->Status->save($status);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$challenge = $this->Challenge->find('first',array('conditions'=>'Challenge.id = '.$challenge_id,'recursive'=>2));\n\t\tif($user){\n\t\t\t$inGroup = false;\n\t\t\tforeach($challenge['ClassSet'] as $c){\n\t\t\t\tforeach($c['User'] as $u){\n\t\t\t\t\tif($u['id'] == $user['User']['id']){\n\t\t\t\t\t\t$inGroup = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$inGroup){\n\t\t\t\t$status = array(\t'user_id'\t\t\t\t=> $user['User']['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'challenge_id'\t=> $challenge_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t=> 'P' );\n\t\t\t\t$this->Status->save($status);\n\t\t\t}\n\t\t}\n\t\tif(($user && !$inGroup) || $this->User->id){\n\t\t\t// add to challenge\n\t\t\t$challenge_update = array('Challenge'=>array('id'=>$challenge_id));\n\t\t\t$challenge_update['Collaborator'] = array(@$user ? @$user['User']['id'] : $this->User->id);\n\t\t\tforeach($challenge['Collaborator'] as $u) if(array_search($u['id'],$challenge_update['Collaborator']) === false) $challenge_update['Collaborator'][] = $u['id'];\n\t\t\t$this->Challenge->save($challenge_update);\n\t\t}\n\t\n\t\tdie();\n\t}", "title": "" }, { "docid": "dab4e31b9b01944acbaf72718c725ce6", "score": "0.38738632", "text": "function bibdk_provider_wayf_accept_create_new_user($mail) {\n $account = bibdk_provider_register_new_user($mail);\n $account->data = array();\n // Save wayf_login on user\n $account->data['accept_wayf'] = $_SESSION['accept_wayf'];\n $account->data['wayf_login'] = $_SESSION['wayf_login'];\n\n // save user\n user_save($account);\n}", "title": "" }, { "docid": "818e14d97d934e84e865d22154d55679", "score": "0.3872616", "text": "public function create(User $actor)\n {\n return $actor->hasPermissionTo('create news');\n }", "title": "" }, { "docid": "a72dcab0e4d65b771c7f87a97ee85d31", "score": "0.3872191", "text": "public function testCanUpdateRecipients()\n {\n $id = rand(1,9999999999);\n $data['data'] = [\n 'expiration_date' => date('Y-m-d', strtotime( '+'.mt_rand(0,30).' days'))\n ];\n $this->json('PUT', \"/voucher/code/{$id}\", $data)\n ->seeJson([\n 'code' => 200,\n 'status' => true\n ]);\n }", "title": "" }, { "docid": "df0a185ab2f840908febd8bed333010f", "score": "0.38497388", "text": "public function request_activation($foundId, $initialRedirect = false) {\n\t\t// require birthday, email, and address\n\t\t$this->User->Profile->validate['birth_date']['required'] = true;\n\t\t$this->User->Profile->validate['birth_date']['allowEmpty'] = false;\n\t\t$this->User->Profile->validate['primary_email']['email']['required'] = true;\n\t\t$this->User->Profile->validate['primary_email']['email']['allowEmpty'] = false;\n\t\t$this->User->Address->validate['address_line_1'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid address.'\n\t\t);\n\t\t$this->User->Address->validate['state'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid state.'\n\t\t);\n\t\t$this->User->Address->validate['city'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid city.'\n\t\t);\n\n\t\tif (!empty($this->data) && !$initialRedirect && $foundId) {\n\t\t\t$this->data['User']['active'] = false;\n\t\t\t$this->data['Address'][0]['model'] = 'User';\n\n\t\t\t$validates = $this->User->saveAll($this->data, array('validate' => 'only'));\n\n\t\t\t// create near-empty user for now (for merging)\n\t\t\tif ($validates && $this->User->createUser($this->data, null, $this->activeUser, false)) {\n\t\t\t\t// save merge request\n\t\t\t\t$MergeRequest = ClassRegistry::init('MergeRequest');\n\t\t\t\t$MergeRequest->save(array(\n\t\t\t\t\t'model' => 'User',\n\t\t\t\t\t'model_id' => $this->User->id,\n\t\t\t\t\t'merge_id' => $foundId,\n\t\t\t\t\t'requester_id' => $this->User->id\n\t\t\t\t));\n\t\t\t\t$this->Notifier->notify(array(\n\t\t\t\t\t'to' => Core::read('notifications.activation_requests'),\n\t\t\t\t\t'template' => 'users_request_activation',\n\t\t\t\t\t'subject' => 'Account merge request',\n\t\t\t\t));\n\t\t\t\t$this->Session->setFlash('Account merge request has been received. You will receive an email when it is confirmed!', 'flash'.DS.'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Unable to send account merge request. Please try again.', 'flash'.DS.'failure');\n\t\t\t}\n\t\t}\n\n\t\t$this->set('foundId', $foundId);\n\t}", "title": "" }, { "docid": "45654f0c452bd64b70b520ce7560775c", "score": "0.38419348", "text": "public function accept($inviteable, string $email, string $role = null)\n {\n $this->validate($inviteable, $email, $role);\n\n $newMember = User::where('email', $email)->first();\n\n $inviteable->users()->attach(\n $newMember,\n ['role' => $role]\n );\n }", "title": "" }, { "docid": "54b04e8ab6b12a70f1223ccfccd5152a", "score": "0.383799", "text": "public function confirmed()\n {\n $this->state = 'A';\n $this->save();\n return $this;\n }", "title": "" }, { "docid": "13f8c887e0ebdf5ea70ab6179a7d0633", "score": "0.38359004", "text": "public function action_addbuddy()\n\t{\n\t\tglobal $modSettings;\n\n\t\tcheckSession('get');\n\t\tis_not_guest();\n\n\t\t// Who's going to be your buddy\n\t\t$user = $this->_req->getQuery('u', 'intval', '');\n\n\t\t// You have to give a user\n\t\tif (empty($user))\n\t\t{\n\t\t\tthrow new Exception('no_access', false);\n\t\t}\n\n\t\tcall_integration_hook('integrate_add_buddies', array($this->user->id, &$user));\n\n\t\t// Add if it's not there (and not you).\n\t\tif (!in_array($user, $this->user->buddies) && $this->user->id != $user)\n\t\t{\n\t\t\t$this->user->buddies[] = $user;\n\n\t\t\t// Do we want a mention for our newly added buddy?\n\t\t\tif (!empty($modSettings['mentions_enabled']))\n\t\t\t{\n\t\t\t\t$notifier = Notifications::instance();\n\t\t\t\t$notifier->add(new NotificationsTask(\n\t\t\t\t\t'buddy',\n\t\t\t\t\t$user,\n\t\t\t\t\t$this->user->id,\n\t\t\t\t\tarray('id_members' => array($user))\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// Update the settings.\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\tupdateMemberData($this->user->id, array('buddy_list' => implode(',', $this->user->buddies)));\n\n\t\t// Redirect back to the profile\n\t\tredirectexit('action=profile;u=' . $user);\n\t}", "title": "" }, { "docid": "e6a51391468d28dcf6fcc4595ba9539a", "score": "0.38352042", "text": "public function testClientVerificationCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "a36478dedfe2094dd5d8fd453e95bf5d", "score": "0.3832612", "text": "function addRecipient()\n {\n if ((!isset($this->passedArgs['recipient_id'])) && (!isset($this->params['form']['recipient_id']))) {\n $this->cakeError('error404');\n }\n\n $recipient_id = isset($this->passedArgs['recipient_id']) ? $this->passedArgs['recipient_id'] : $this->params['form']['recipient_id'];\n $this->User->recursive = -1;\n if (!($recipient = $this->User->find('first', array('conditions' => array('User.id' => $recipient_id))))) {\n $this->cakeError('error404');\n }\n\n //$this->autoRender = false;\n $this->layout = false;\n $this->ajax = true;\n\n $tmp_recipients = $this->Session->read('email_recipients');\n array_push($tmp_recipients, $recipient);\n //Store added recipient to session\n $this->Session->write('email_recipients', $tmp_recipients);\n $this->set('recipient', $recipient['User']);\n $this->render('/elements/emailer/edit_recipient');\n\n }", "title": "" }, { "docid": "d4496df1168782f9f278d873f0f3bb83", "score": "0.38323617", "text": "function &getDelegate(){\n\t\tif ( $this->delegate === -1 ){\n\t\t\t$delegate_path = DATAFACE_SITE_PATH.'/conf/ApplicationDelegate.php';\n\t\t\tif ( is_readable($delegate_path) ){\n\t\t\t\timport($delegate_path);\n\t\t\t\t$this->delegate = new conf_ApplicationDelegate();\n\t\t\t} else {\n\t\t\t\t$this->delegate = null;\n\t\t\t}\n\t\t}\n\t\treturn $this->delegate;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "e5f17ea3960bfa55bb5d807c4daed40a", "score": "0.3830707", "text": "public function acceptConsentRequest($challenge, $body)\n {\n return $this->put('consent', 'accept', $challenge, $body);\n }", "title": "" }, { "docid": "3111e0f0671ad0ea5dc42fdca30ec2c3", "score": "0.38287333", "text": "public function retrieved(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "d33c8b37d2574ae068f6a85ba8abec90", "score": "0.38279492", "text": "public function create(Mailbox $user)\n {\n return $user->administratedDomains()\n ->count() > 0;\n }", "title": "" }, { "docid": "6539467ce6a585559466a3896c01c37b", "score": "0.38271213", "text": "public function create(array $aliases): ClaimCheckerManager\n {\n $checkers = [];\n foreach ($aliases as $alias) {\n if (! isset($this->checkers[$alias])) {\n throw new InvalidArgumentException(sprintf(\n 'The claim checker with the alias \"%s\" is not supported.',\n $alias\n ));\n }\n $checkers[] = $this->checkers[$alias];\n }\n\n return new ClaimCheckerManager($checkers);\n }", "title": "" }, { "docid": "c2d7a8d7ca2d4c6fe7a660cf092a803a", "score": "0.3815944", "text": "public function store(CreateAcceptedRecordsRequest $request)\n {\n $input = $request->all();\n\n $acceptedRecords = $this->acceptedRecordsRepository->create($input);\n\n Flash::success('Accepted Records saved successfully.');\n\n return redirect(route('acceptedRecords.index'));\n }", "title": "" }, { "docid": "8bfc61185024f2ac399ebb7bb75f1ec2", "score": "0.38126898", "text": "public function acceptFriendship($sender)\n\t{\n\t\tAuth::user()->acceptFriendRequest($sender);\n\t}", "title": "" }, { "docid": "2e0fc368f77d6d75f5b6092678b82c4c", "score": "0.38114992", "text": "public function saveCooperativeMember($cooperative,$name,$id_no,$phone,$dob,$gender){\n\t\t$query=\"INSERT INTO coo_members(cooperative,name,id_no,phone,dob,gender,status)\n\t\tVALUES (\\\"$cooperative\\\",\\\"$name\\\",\\\"$id_no\\\",\\\"$phone\\\",\\\"$dob\\\",\\\"$gender\\\",'ACTIVE')\";\n\t\t$status=$this->insert($query);\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "e3623540c0f98c8abed432ae4f192f6a", "score": "0.38107184", "text": "public function addTeamMember(): void\n {\n $this->addTeamMemberForm->getState();\n\n if (Features::sendsTeamInvitations()) {\n app(InvitesTeamMembers::class)->invite(\n $this->user,\n $this->team,\n $this->email,\n $this->role\n );\n\n $message = __('filament-jet::teams/add-member.messages.invited');\n } else {\n app(AddsTeamMembers::class)->add(\n $this->user,\n $this->team,\n $this->email,\n $this->role\n );\n\n $message = __('filament-jet::teams/add-member.messages.added');\n }\n\n $this->email = '';\n $this->role = null;\n\n $this->team = $this->team->fresh();\n\n Notification::make()\n ->title($message)\n ->success()\n ->send();\n }", "title": "" }, { "docid": "bd42b808792f171a933ff920b7c09fb8", "score": "0.3808275", "text": "public function addMembership(\n string $id,\n string $first_name,\n string $last_name,\n string $offer,\n DateTime $start_date,\n DateTime $expire_date,\n ?string $email = null,\n ?string $notes = null,\n ?string $status = null,\n ?bool $provisional = null,\n ?array $additional_metadata = null\n ): stdClass {\n try {\n $this->getMembershipById($id);\n // Simulates existing API response.\n throw new BadRequestException(\n new Response(400, [], json_encode(['errors' => ['__all__' =>\n ['Membership with this Station call sign and Membership ID already exists.']\n ]]))\n );\n } catch (MembershipNotFoundException) {\n // Continue execution, as this exception is desired.\n }\n $data = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'offer' => $offer,\n 'notes' => $notes,\n 'start_date' => $start_date,\n 'expire_date' => $expire_date,\n 'status' => $status,\n 'provisional' => $provisional,\n 'additional_metadata' => $additional_metadata,\n ];\n self::dateTimesToStrings($data);\n // Remove null/empty values.\n $data = array_filter($data, [__CLASS__, 'notEmptyOrNull']);\n $response = $this->request('put', 'memberships/' . $id, ['json' => $data]);\n return json_decode($response->getBody()->getContents());\n }", "title": "" }, { "docid": "852690bd5dba48daf8a895ed86ad5603", "score": "0.37977982", "text": "public function store(Request $request)\n {\n $request->validate(\n [\n 'user_id' => 'required|max:255',\n 'email' => 'required|email:rfc,dns'\n ],\n [\n 'user.required' => 'User Id is required',\n 'user.email' => 'Email address is required',\n ]\n );\n\n $id = Auth::id();\n $user = User::where('id', $id)->first();\n\n // check email if exist\n $inviteUser = User::where('email', $request->input('email'))->first();\n\n // check if already sent the email invite\n $inviteRequest = ContactInvite::where('email', $request->input('email'))\n ->where('user_id', $user->id)\n ->first();\n\n if($inviteRequest) {\n return response()->json(['status' => true, 'message' => 'Already sent an invitation']);\n }\n\n if($inviteUser) {\n $contactList = ContactLists::where('user_id', $user->id)\n ->where('contact_id', $inviteUser->id)\n ->first();\n \n if($contactList) {\n return response()->json(['status' => true, 'message' => 'Contact already added']);\n }\n }\n\n if($inviteUser) {\n // end direct notification invite\n // create invite link and send to email\n $data = [\n 'user_id' => $id,\n 'contact_id' => $inviteUser->id,\n 'email' => $request->input('email'),\n 'direct_invite' => 1,\n 'status' => 1\n ];\n\n $contactInvite = ContactInvite::create($data);\n // create contact list record\n ContactLists::create(['user_id' => $id, 'contact_id' => $inviteUser->id, 'status' => 1]);\n // send notification\n $contactInvite->name = $user->name;\n Notification::send($inviteUser, new SendUserNotification($contactInvite));\n return response()->json(['status' => true, 'message' => \"Sent invitation for contact. Invite will be on the user's notification page.\"]);\n }\n\n \n // create invite link and send to email\n $data = [\n 'user_id' => $id,\n 'email' => $request->input('email'),\n 'invite_link' => md5(time().\"$id\")\n ];\n\n\n $contact = ContactInvite::create($data);\n $data['url'] = $url = route('register').\"?invite_link=\".$data['invite_link'];\n $data['name'] = $user->name;\n $user->email = $data['email'];\n // $user->email = $data['email'];\n\n // Mail::to($request->input('email'))->send(new InviteContact($user));\n Notification::send($user, new InviteContacts($data));\n return response()->json(['status' => true, 'message' => 'Sent invitation via email for contact']);\n }", "title": "" }, { "docid": "1b0cd1cd601bd6beb5e8331e6dd03d24", "score": "0.37834176", "text": "public function add(string $alias, ClaimChecker $checker): void\n {\n $this->checkers[$alias] = $checker;\n }", "title": "" }, { "docid": "0b7569a050e3adf50cd0df1d8d8fba16", "score": "0.37820402", "text": "public function store(BanValidator $input, $userId): RedirectResponse\n {\n $user = $this->usersRepository->find($userId) ?: abort(Response::HTTP_NOT_FOUND);\n\n if (Gate::allows('block', $user)) { // Check if the user is allowed to perform the action.\n if ($user->isNotBanned()) { // The given user is not currently banned.\n if ($user->ban(['comment' => $input->reason, 'expired_at' => $input->endDate])) { // DB = USER BANNED\n $message = \"{$user->name} has been blocked in the system.\";\n activity()->causedBy(auth()->user())->log(\"Has blocked {$user->name} in the system\");\n\n Mail::to($user->email)->queue(new BlockActionPerformed($input->all()));\n }\n } else { // The user is already banned in the database.\n $message = \"{$user->name} has already been blocked in the system.\";\n }\n }\n\n flash(isset($message) ? $message : 'You are not permitted to perform this action.')->info();\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "c4acd44d61e0f1406489362a5c9ffb75", "score": "0.3780678", "text": "public function actionInviteAccept()\n {\n\n $this->forcePostRequest();\n $space = Space::findOne(['guid' => Yii::$app->request->get('sguid')]);\n\n // Load Pending Membership\n $membership = $space->getMembership();\n if ($membership == null) {\n throw new HttpException(404, Yii::t('SpaceModule.controllers_SpaceController', 'There is no pending invite!'));\n }\n\n // Check there are really an Invite\n if ($membership->status == Membership::STATUS_INVITED) {\n $space->addMember(Yii::$app->user->id);\n }\n\n return $this->redirect($space->getUrl());\n }", "title": "" }, { "docid": "ac0db3ab85decd53642aea0f92636c4e", "score": "0.3779772", "text": "public function createUser( array $data, $verified = true )\n {\n if ( empty( $data['user']['name'] ) || empty( $data['user']['email'] ) ) {\n throw new \\Exception( 'Users need a name or an email to be created' );\n }\n $data['user']['verified'] = $verified;\n return $this->_api->call( '/users' , json_encode( $data ), 'POST' );\n }", "title": "" }, { "docid": "d7c27e58fc697e204ea915c0b565c4c2", "score": "0.37796295", "text": "public function createMemberIfMemberDoesNotExist($fullName, $phone, $email,\n $location, $dateOfBirth, $gender, $approvalStatus, $disapprovedStatus, $userId) {\n $member = $this->getMemberByUserId($userId);\n if ($member == null) {\n return \\App\\Member::create([\n 'full_name' => $fullName,\n 'phone' => $phone,\n 'email' => $email,\n 'location' => $location,\n 'date_of_birth' => $dateOfBirth,\n 'approved_status' => $approvalStatus,\n 'disapproved_status' => $disapprovedStatus,\n 'gender' => $gender,\n 'user_id' => $userId,\n ]);\n }\n return $member;\n }", "title": "" }, { "docid": "3e229b3796243b0fbb35e4f1d7dd5ac6", "score": "0.37766787", "text": "public function add_member() {\n TeamMembers::create([\n 'user_id' => request('user_id'),\n 'team_id' => request('team_id')\n ]);\n return redirect()->route('team');\n }", "title": "" } ]
0649df9976766086b17a0dbb6021cba0
We'll set the base value to whatever is in our Event Parameters
[{"docid":"75f75ecc2331d9872bf55f661eb0f86b","score":"0.46832326","text":"protected function ParseEv(...TRUNCATED)
[{"docid":"453a8c02c9d5c4e1835559f38dbcc3dc","score":"0.72171867","text":"function event_buffer_base(...TRUNCATED)
695c04b2527e3cb54e8ab27a5421a3c7
Add elements to form
[{"docid":"ec58e006e9f013e79810d6955b993057","score":"0.6057305","text":"public function definition((...TRUNCATED)
[{"docid":"446a67884fa68de219fb12845be0cca1","score":"0.7769082","text":"protected function addEleme(...TRUNCATED)
3c97210fa146e00b7efc6f9bd797ef19
get food item details
[{"docid":"b4dd50b7b9cf9043ec855c24e9fabfa9","score":"0.7255568","text":"public function getFoodItem(...TRUNCATED)
[{"docid":"23e3a1b071ced7250f67532b4e84750c","score":"0.7190272","text":"function item_get(){\n (...TRUNCATED)
39a082fcd98a7d62072e76981efb5728
Selected Un Read the specified resource from storage.
[{"docid":"289b8c64c98ba478b3fb3857df4dd0a2","score":"0.0","text":"public function selectedUnread(Re(...TRUNCATED)
[{"docid":"6f6cd93fc05e76993ef09e7e4fb7b8a6","score":"0.6138642","text":"public function unRead()\n (...TRUNCATED)
d01723bf272821476e9f3277983e3c0e
Returns HTTP Response headers
[{"docid":"4256fd3a6fcde148733003cec618e624","score":"0.74205357","text":"public function getHeaders(...TRUNCATED)
[{"docid":"517439460851a0196d49a2d726c72253","score":"0.87092555","text":"public function getRespons(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
58