void NsAdapterCatalog::updateUser(const UserInfo& user) throw (DmException) { // uid may not be initialized UserInfo u = this->getUser(user.name); wrapCall(dpns_modifyusrmap(u.getUnsigned("uid"), (char*)user.name.c_str(), user.getLong("banned"))); }
void AuthnOracle::updateUser(const UserInfo& user) throw (DmException) { occi::Statement* stmt = getPreparedStatement(this->conn_, STMT_UPDATE_USER); try { stmt->setInt(1, user.getLong("banned")); stmt->setString(2, user.name); stmt->executeUpdate(); this->conn_->commit(); this->conn_->terminateStatement(stmt); } catch (occi::SQLException& ex) { this->conn_->rollback(); throw DmException(DM_INTERNAL_ERROR, ex.getMessage()); } }