Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


how to forbid user to put spaces in their first name in WHMCS?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

how to forbid user to put spaces in their first name in WHMCS?

spaces in first name will cause fatal errors for my VNC connection integration. is there a method to forbid this?

«1

Comments

  • mikhomikho Member, Host Rep

    Filter the usernsme on your side.

  • jarjar Patron Provider, Top Host, Veteran

    No specific feature, and since its encoded you can't reasonably change the software. Like @mikho mentioned, filter it before sending it out to from your module, that would be the best way.

  • @mikho said:
    Filter the usernsme on your side.

    :) really no way to filter it on whmcs side?

  • lewissuelewissue Member
    edited August 2015

    @Jar said:
    No specific feature, and since its encoded you can't reasonably change the software. Like mikho mentioned, filter it before sending it out to from your module, that would be the best way.

    well, I got a programmer to do this module, but I can not contact him now....

    if I can't forbid users to put spaces in WHMCS, I losed my money

  • mikhomikho Member, Host Rep

    @lewissue said:
    :) really no way to filter it on whmcs side?

    As @Jar said: WHMCS is encoded. You have to filter it in your module, unless that also is encoded.

  • lewissuelewissue Member
    edited August 2015

    @mikho said:
    As Jar said: WHMCS is encoded. You have to filter it in your module, unless that also is encoded.

    yep you are right, it's also encoded...

    I got a programmer to do this module, but I can not contact him now....

    if I can't forbid users to put spaces in WHMCS, I losed my money(facepalm)

    I think templates are not encoded?

  • mikhomikho Member, Host Rep

    You can code whmcs hook for clientadd and clientedit. Only choice to do it in whmcs. Either remove the space there or filter the spaces.

    Thanked by 1lewissue
  • @mikho said:
    You can code whmcs hook for clientadd and clientedit. Only choice to do it in whmcs. Either remove the space there or filter the spaces.

    thanks then, I will get another programmer to do this function for me(facepalm)

  • You can code your own registration through the WHMCS api...

  • @Jonchun said:
    You can code your own registration through the WHMCS api...

    the method of @mikho seems simpler and I would get a cheaper programmer then...

  • Simply put a big warning on your registration / user details change pages - "PLEASE DO NOT PUT SPACES IN YOUR FIRST NAME, THIS WILL MAKE YOUR SERVICE UNUSABLE".

    If they still choose to put spaces, well...

  • rm_rm_ IPv6 Advocate, Veteran
    edited August 2015

    What about people who actually have spaces in their first name? The world cultures/languages are so diverse, you can't assume anything about names.

  • I've never seen spaces in a first name. What would that look like?

  • rds100rds100 Member
    edited August 2015

    Ole_Juul said: I've never seen spaces in a first name. What would that look like?

    People from some countries like Spain and Mexico have many names. So they write several names in each filed, with spaces i between.

  • mikhomikho Member, Host Rep

    @rm_ said:
    What about people who actually have spaces in their first name? The world cultures/languages are so diverse, you can't assume anything about names.

    Thats why the best way is to implement the filter in the username creation instead of editing a clients details.

    I did a similar thing for my VestaCP module when someone signed up using firstname and middlename.
    I updated the module to only use the firstname and lastname instead of trying to use the full name (first-, middle- and lastname).

    the important part is to keep the clients details as the client wrote them when signing up or if he/she edits them.

  • @Ole_Juul said:
    I've never seen spaces in a first name. What would that look like?

    I got two names as well. In any legal place I write both. Sometimes I write the one I usually don't use like M. And continue the second name.

  • @Nomad said:
    I got two names as well. In any legal place I write both. Sometimes I write the one I usually don't use like M. And continue the second name.

    Firstname & Lastname system != Two names system

  • @lewissue said:
    the method of mikho seems simpler and I would get a cheaper programmer then...

    How is it simpler? His method is using whmcs api too...

  • @Jonchun said:

    • it sounds easier
  • @TinyTunnel_Tom said:

    • it sounds easier

    but it's the same thing... i just didn't see his post when i posted.

  • rds100 said: People from some countries like Spain and Mexico have many names. So they write several names in each filed, with spaces i between.

    I'm well aware of that, but the second name is not the first name. Perhaps you mean "given name"? That's usually how the first, second, etc., names are distinguished from the family, (sometimes called last), name. A person's second name is not the same as their last name. Sorry to be pedantic, but there is only one first name.

    Thanked by 1stackmutt
  • @DalComp said:
    Firstname & Lastname system != Two names system

    In most forms, it is.

  • Fix your VNC integration

  • cassa said: Fix your VNC integration

    That... not really a good solution to implement a hack like that.

  • DBADBA Member

    If you want/need a unique ID / username for a client use the WHMCS clientid along with some static text. Ex. MVPSUser43 for clientid 43.

  • BharatBBharatB Member, Patron Provider

    I can help you with that :) , please get back to me on skype.

    Thanked by 1lewissue
  • @Jonchun said:

    I think it may be simpler for the ioncube is really difficult to be patched:)

  • @BharatB said:
    I can help you with that :) , please get back to me on skype.

    are you phoenix.talisman?

    I had you in the contract~

  • BharatBBharatB Member, Patron Provider

    @lewissue said:
    I had you in the contract~

    yes

  • Ole_Juul said: I've never seen spaces in a first name. What would that look like?

    Yup. My full name contain six words ;)

    Use clientadd and clientupdate calls from whmcs action hooks. Replace spaces with _ and you're good to go. ;)

Sign In or Register to comment.