mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 16:11:12 +02:00
2021-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that threw a SQL error when attempting to add a new user. * Fixed a bug in rdadmin(1) that caused the incorrect Login Name to appear in the 'Rivendell User List' dialog immediately after adding the user. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -35,10 +35,8 @@ AddUser::AddUser(QString *username,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMaximumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
setMinimumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
|
||||
setWindowTitle("RDAdmin - "+tr("Add User"));
|
||||
|
||||
@@ -104,16 +102,12 @@ void AddUser::okData()
|
||||
}
|
||||
|
||||
sql=QString("insert into `USERS` set ")+
|
||||
"`LOGIN_NAME`='"+RDEscapeString(username)+"',"+
|
||||
"`PASSWORD`=PASSWORD('')";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->isActive()) {
|
||||
"`LOGIN_NAME`='"+RDEscapeString(username)+"'";
|
||||
if(!RDSqlQuery::apply(sql)) {
|
||||
QMessageBox::warning(this,tr("User Exists"),tr("User Already Exists!"),
|
||||
1,0,0);
|
||||
delete q;
|
||||
return;
|
||||
}
|
||||
delete q;
|
||||
sql="select `NAME` from `GROUPS`";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
|
Reference in New Issue
Block a user