Howdy, Stranger!

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

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

How to disable last name?

We are a group that only uses usernames and not real names. It is somewhat annoying to put iggyvolz - . Is it possible to disable the "last name" field or at least make it not required?

Comments

  • There is no last name field. There is simply "Name". It does not check to make sure there is a first and last name in the field. So I'm not real sure what mean.

    Which fields are required are controlled in the \include\class.ticket.php

    in the following functions
    function update
    function create
  • I'm talking about adding a new user:
    image
  • Oh on the staff side.... of version 1.6ST... not 1.7. (because your screen shot is not 1.7x)

    It would probably be a pain, because $lastname is used in several places through out the scp side.

    First thing that you would want to do is open the ost_staff table in the database and ensure that lastname is not set to "NOT NULL". Mine is set that way already, but I could have changed it at some point.

    You would need to edit line 422 of \scp\admin.php to stop the display of lastname when adding a user.

    You would want to edit \scp\profile.php on line 83-85. and remove the requirement for last name. on line 103 you can remove or change the lastname line there. If you remove it there is probably more changes you will have to make. If you leave it, it should be fine since it will just put a null in the db.

    You would want to edit line 23 of \scp\directory.php to not try to pull lastname from the database. (since it will be null anyway). you could also remove line 35 (why allow last name search if there are no last names). Edit line 45 and remove lastname from the ORDER BY. edit line 89 there will be no $row['lastname'].

    lastname is also mentioned in: \include\class.staff.php on line 29. It's probably okay to just leave this one. Again on line 54 and 55. It is probably fine to leave those there also. Line 122-124 is the function for getting last name. Its probably fine to not touch that also. However down on line 258 is one that we would need to change. You would remove " || !$vars['lastname']" and change the next line to only say First name required. Making that one change may be the most important thing that you do. Down on 311 is another reference, which setups up whats getting put into the database. You can probably leave that alone.


    You should also probably change line 15 of \include\staff\staffmembers.inc.php so that it sorts only by firstname.

    Note that I have no idea if these directions are exhaustive or if I got all the references to lastname. Making these modifications listed here are definitely a do at your own risk sort of thing.

    Good luck.
  • I think I'll just leave it.
Sign In or Register to comment.