cursor.execute("UPDATE auth_user SET first_name = '"+first_name+"', last_name = '"+last_name+"', email = '"+email+"' WHERE id="+iduser)
cursor.execute("UPDATE auth_user SET first_name = '"+first_name+"', last_name = '"+last_name+"', email = '"+email+"', phone = '"+phone+"' WHERE id="+iduser)
withconn.cursor()ascurGroup:
curGroup.execute("DELETE FROM auth_user_groups WHERE user_id="+iduser)
ifgroup!='none':
withconn.cursor()ascurGroup:
curGroup.execute("DELETE FROM auth_user_groups WHERE user_id="+iduser)
users=User.objects.get(username=usernames)
...
...
@@ -282,13 +284,19 @@ def addUser(request):
user.password=make_password(password)
user.save()
# add user to group
userinsert=User.objects.get(username=usernames)
insertgroups=Group.objects.get(name=group)
insertgroups.user_set.add(userinsert)
# add phone
withconn.cursor()ascursor:
cursor.execute("UPDATE auth_user SET phone = '%s' WHERE username = '%s' and first_name = '%s' and last_name = '%s'"%(phone,usernames,first_name,last_name))
text:"Untuk di mobile tampilan manajemen perbaikan tidak mendukung, Silahkan akses menggunakan laptop atau PC",
type:"warning",
icon:"error",
confirmButtonColor:"#00BCD4"
})
setTimeout(function(){
$("#panel-sm2").removeClass('active')
$("#manage_perbaikan").removeClass('active')
$("#btn-hide-all").css("display","none")
},500);
}
})
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)