Meap Don't need glasses if you C# Nov 7, 2010 1,045 296 May 7, 2016 #1 I completely forgot how to do it but how would I go about implementing a thing into the register where if the name they decided contains something like MOD- etc it would tell them they can't use that?
I completely forgot how to do it but how would I go about implementing a thing into the register where if the name they decided contains something like MOD- etc it would tell them they can't use that?
JayC Always Learning Aug 8, 2013 5,497 1,398 May 8, 2016 #2 1) In the class.users file find the register code and add a new if statement and create a new function called something like "containsIllegalWords" 2) Setup the method with an array, and loop through the array to see if the string you sent containsIllegalWords contains any element of the array. [Yes] -> return true [No] -> return false if(!containsIllegalWords['post_username']){ //other code }else{ $err = 'Sorry, you can not use that username'; } Upvote 0 Downvote
1) In the class.users file find the register code and add a new if statement and create a new function called something like "containsIllegalWords" 2) Setup the method with an array, and loop through the array to see if the string you sent containsIllegalWords contains any element of the array. [Yes] -> return true [No] -> return false if(!containsIllegalWords['post_username']){ //other code }else{ $err = 'Sorry, you can not use that username'; }