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
This commit is contained in:
lxnay
2008-10-23 17:52:22 +00:00
parent 19a07d0114
commit 8455ece1bb

View File

@@ -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):