static function uniqueSubdomain() { if (self::$currentSubdomain) { return self::$currentSubdomain; } $subdomain = trim(file_get_contents(codecept_data_dir('subdomains.txt'))); $resultSubdomain = str_shuffle($subdomain); self::$currentSubdomain = $resultSubdomain; file_put_contents(codecept_data_dir('subdomains.txt'), $resultSubdomain); return $resultSubdomain; }
/** * Deletes a data_user * * @param string $_id */ public function deleteAction($_id) { $data_user = DataUser::findFirst(array(array("username" => $_id))); if (!$data_user) { $this->flash->error("data_user was not found"); return $this->dispatcher->forward(array("controller" => "data_user", "action" => "index")); } if (!$data_user->delete()) { foreach ($data_user->getMessages() as $message) { $this->flash->error($message); } return $this->dispatcher->forward(array("controller" => "data_user", "action" => "search")); } $this->flash->success("data_user was deleted successfully"); return $this->dispatcher->forward(array("controller" => "data_user", "action" => "index")); }