Dan,

Please post the code that makes up the validateUserName() method on
UserGateway - I think I may be able to help.

-Joe


On 8/3/06, Dan Vega <[EMAIL PROTECTED]> wrote:
This error is happening when I try to add a new record and the validation is
called, this is the query in the usersValidator.cfc which eventually calls
the method validateUsername which is in the gateway. This error happens when
I use the username and password attributes OR if I ommit them.

    <cffunction name="validateUsername" access="public" hint="I validate the
username field" output="false" returntype="reactor.util.ErrorCollection">
        <cfargument name="UserRecord" hint="I am the UserRecord to
validate." required="no" type="
reactor.project.scfsinc.Record.UsersRecord" />
        <cfargument name="ErrorCollection" hint="I am the error collection
to populate. If not provided a new collection is created." required="no"
type=" reactor.util.ErrorCollection"
default="#createErrorCollection(arguments.UserRecord._getDictionary())#"
/>
        <cfset var UserGateway =
_getReactorFactory().createGateway("Users") />

        <cfset super.validateUsername(arguments.UserRecord,
arguments.ErrorCollection) />

        <!--- validate username is unique if we are adding a new user --->
        <cfif userRecord.getUserId() EQ 0>
            <cfif
UserGateway.validateUserName(arguments.UserRecord.getUserName())>
                <cfset
arguments.ErrorCollection.addError("users.username.duplicate")
/>
            </cfif>
        </cfif>

        <cfreturn arguments.ErrorCollection />
    </cffunction>


On 8/3/06, Tom Chiverton <[EMAIL PROTECTED]> wrote:
> On Thursday 03 August 2006 14:23, Dan Vega wrote:
> >     <cffunction name="validateUserName" access="public" hint="I look for
>
> What other querys are being run ? Is this the only non-reactor query ?
> What happens if your rewrite it as an OO query, for instance ?
> What happens if you take out the username/password from your cfquery ?
>
> --
> Tom Chiverton
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office address
is at St James's Court Brown Street Manchester M2 2JF.  A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and
may be confidential or legally privileged.  If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents.  If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 8008.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at:
http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
>
>



--
Dan Vega
[EMAIL PROTECTED]

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at:
http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --


--
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to