Skip to content

Instantly share code, notes, and snippets.

View dead1ock's full-sized avatar

Dallin Wellington dead1ock

View GitHub Profile
bool MysqlAccountProvider::AutoRegisterAccount(std::string username, std::string password) {
bool success = false;
try {
string sql = "call sp_CreateAccount(?,?,?);";
auto conn = db_manager_->getConnection("galaxy_manager");
auto statement = shared_ptr<sql::PreparedStatement>(conn->prepareStatement(sql));
statement->setString(1, username);
statement->setString(2, password);
statement->setString(3, "");
auto rows_updated = statement->executeUpdate();
if(login_auto_registration_ == true)
{
if(account_provider_->AutoRegisterAccount(message.username, message.password))
{
HandleLoginClientId_(login_client, message);
return;
}
}
php app/console doctrine:database:drop --force
php app/console doctrine:database:create
php app/console doctrine:schema:create
php app/console doctrine:fixtures:load --fixtures=vendor/bundles/Anh/SwgManagerBundle/DataFixtures/ORM --append
php app/console fos:user:create
php app/console swg:players:sync
<form action="{{ path('itemtemplate_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>
{{ form_errors(edit_form) }}
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.vendor) }}
{{ form_row(edit_form.sku) }}
<br />
{% for trait in edit_form.trait %}
{{ form_row(trait) }}
{% endfor %}
{{ form_rest(edit_form) }}