mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 22:56:20 +01:00
SMF Forum Integration
* Added SMF Forum Support * removed comment * Fixed bugs. * removed unused SQL statement * Fixed Grammer in debug code * Fixed Null Bug * Update operationmanagement.html * fixed bug * fixed error * Users now show up on the posts correctly
This commit is contained in:
@@ -135,3 +135,14 @@ class AuthServicesInfoManager:
|
||||
else:
|
||||
logger.error("Failed to update user %s IPS4 info: user does not exist." % user)
|
||||
|
||||
@staticmethod
|
||||
def update_user_smf_info(username, password, user):
|
||||
if User.objects.filter(username=user.username).exists():
|
||||
logger.debug("Updating user %s forum info: username %s" % (user, username))
|
||||
authserviceinfo = AuthServicesInfoManager.__get_or_create(user)
|
||||
authserviceinfo.smf_username = username
|
||||
authserviceinfo.smf_password = password
|
||||
authserviceinfo.save(update_fields=['smf_username', 'smf_password'])
|
||||
logger.info("Updated user %s smf info in authservicesinfo model." % user)
|
||||
else:
|
||||
logger.error("Failed to update user %s smf info: user does not exist." % user)
|
||||
|
||||
@@ -17,6 +17,8 @@ class AuthServicesInfo(models.Model):
|
||||
ips4_username = models.CharField(max_length=254, blank=True, default="")
|
||||
ips4_password = models.CharField(max_length=254, blank=True, default="")
|
||||
ips4_id = models.CharField(max_length=254, blank=True, default="")
|
||||
smf_username = models.CharField(max_length=254, blank=True, default="")
|
||||
smf_password = models.CharField(max_length=254, blank=True, default="")
|
||||
main_char_id = models.CharField(max_length=64, blank=True, default="")
|
||||
is_blue = models.BooleanField(default=False)
|
||||
user = models.ForeignKey(User)
|
||||
|
||||
Reference in New Issue
Block a user