From 8455ece1bb5bf01831bb96a302ba571ee11e042b Mon Sep 17 00:00:00 2001 From: lxnay Date: Thu, 23 Oct 2008 17:52:22 +0000 Subject: [PATCH] Entropy/phpBB3AuthInterface: - add new method activate_user(), useful to activate users after the registration git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2555 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index 2f28518e3..94466ed23 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -19240,6 +19240,11 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface): import binascii return str(binascii.crc32(email.lower())) + str(len(email)) + def activate_user(self, user_id): + self.check_connection() + self.cursor.execute('UPDATE '+self.TABLE_PREFIX+'users SET user_type = %s WHERE `user_id` = %s', (self.USER_NORMAL,user_id,)) + return True, user_id + def register_user(self, username, password, email, activate = False): if len(username) not in self.USERNAME_LENGTH_RANGE: @@ -19261,7 +19266,7 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface): # now cross fingers user_id = self.__register(username, password, email, activate) - return True,user_id + return True, user_id def __register(self, username, password, email, activate):