[pLog-svn] r4243 - plog/trunk/class/summary/action
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Nov 5 19:55:40 GMT 2006
Author: oscar
Date: 2006-11-05 19:55:40 +0000 (Sun, 05 Nov 2006)
New Revision: 4243
Modified:
plog/trunk/class/summary/action/dofinishregister.class.php
Log:
register.php now grants the login_perm permission so that the user is allowed to log in
Modified: plog/trunk/class/summary/action/dofinishregister.class.php
===================================================================
--- plog/trunk/class/summary/action/dofinishregister.class.php 2006-11-05 19:30:00 UTC (rev 4242)
+++ plog/trunk/class/summary/action/dofinishregister.class.php 2006-11-05 19:55:40 UTC (rev 4243)
@@ -13,6 +13,8 @@
lt_include( PLOG_CLASS_PATH."class/summary/view/blogtemplatechooserview.class.php" );
lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
lt_include( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/permissions.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
/**
* Finish the user and blog registration process.
@@ -107,6 +109,13 @@
return false;
}
+ // assign the login_perm permission so that the user can log in
+ $perms = new Permissions();
+ $loginPerm = $perms->getPermissionByName( "login_perm" );
+ $userPerms = new UserPermissions();
+ $userPerm = new UserPermission( $userId, 0, $loginPerm->getId());
+ $userPerms->grantPermission( $userPerm );
+
// post-user create hook
$this->postUserCreateHook( $user );
More information about the pLog-svn
mailing list