Location: PHPKode > scripts > Support Tickets Center > zingiri-tickets/osticket/upload/include/class.client.php

    Handles everything about client

    The class will undergo major changes one client's accounts are used. 
    At the moment we will play off the email + ticket ID authentication.

    Peter Rotich <hide@address.com>
    Copyright (c)  2006-2010 osTicket

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
    $Id: $

class Client {

    var $id;
    var $fullname;
    var $username;
    var $passwd;
    var $email;

    var $udata;
    var $ticket_id;
    var $ticketID;

    function Client($email,$id){
        $this->id =0;
        return ($this->lookup($id,$email));

    function isClient(){
        return TRUE;

    function lookup($id,$email=''){
        $sql='SELECT ticket_id,ticketID,name,email FROM '.TICKET_TABLE.' WHERE ticketID='.db_input($id);
        if($email){ //don't validate...using whatever is entered.
            $sql.=' AND email='.db_input($email);
        if(!$res || !db_num_rows($res))
            return NULL;

        /* Faking most of the stuff for now till we start using accounts.*/
        $this->id         = $row['ticketID']; //placeholder
        $this->ticket_id  = $row['ticket_id'];
        $this->ticketID   = $row['ticketID'];
        $this->fullname   = ucfirst($row['name']);
        $this->username   = $row['email'];
        $this->email      = $row['email'];

    function getId(){
        return $this->id;

    function getEmail(){

    function getUserName(){

    function getName(){
    function getTicketID() {
        return $this->ticketID;

Return current item: Support Tickets Center