[pLog-svn] r3512 - plog/trunk/class/summary/action
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri Jun 2 19:37:53 GMT 2006
Author: mark
Date: 2006-06-02 19:37:53 +0000 (Fri, 02 Jun 2006)
New Revision: 3512
Modified:
plog/trunk/class/summary/action/checkusernameajaxaction.class.php
Log:
Add validation check in "check username".
Modified: plog/trunk/class/summary/action/checkusernameajaxaction.class.php
===================================================================
--- plog/trunk/class/summary/action/checkusernameajaxaction.class.php 2006-06-02 18:47:14 UTC (rev 3511)
+++ plog/trunk/class/summary/action/checkusernameajaxaction.class.php 2006-06-02 19:37:53 UTC (rev 3512)
@@ -3,7 +3,7 @@
include_once( PLOG_CLASS_PATH."class/summary/action/registeraction.class.php" );
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
include_once( PLOG_CLASS_PATH."class/summary/view/summaryxmlview.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+ include_once( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
/**
@@ -37,6 +37,15 @@
$this->_view = new SummaryXmlView( "response" );
$this->_view->setValue( "method", "checkUserNameAjax" );
+ $uv = new UsernameValidator();
+ if( !$uv->validate( $this->_userName ) )
+ {
+ $this->_view->setValue( "success", "0" );
+ $this->_view->setValue( "message", $this->_locale->tr("error_incorrect_username") );
+
+ return true;
+ }
+
// create the object...
$users = new Users();
$userInfo = $users->getUserInfoFromUsername( $this->_userName );
More information about the pLog-svn
mailing list