Example #1
0
    public function __construct()
    {
        parent::__construct();

        $user_id = IsSetGetPost(USERS_USERID);
        if (!$user_id)
        {
            $user_id = BoydsnestSession::GetInstance()->get(USERS_USERID);
        }

        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $this->data = $user_factory->select_first($user_id, array(
                        DBFactory::SELECT_GET_ONLY => array(
                            USERS_USERID, USERS_USERNAME, USERS_SCHEMEUSING,
                            USERS_EMAIL, USERS_SECRETANSWER, USERS_SECRETQUESTION,
                            USERS_EXPIRESWHEN, USERS_CREATEDWHEN
                        )
                    ));
        }
        catch(DBFactoryException $e)
        {
            throw new UserActionException(
                    "An Error Occurred While Trying To Get The Profile",
                    $e);
        }
    }
Example #2
0
    public function __construct($user_id = false)
    {
        parent::__construct();

        // getting the user id
        if (!$user_id)
        {
            $user_id = IsSetGetPost(USERS_USERID);
            if (!$user_id)
            {
                throw new UserActionException("no user selected");
            }
            if (!is_numeric($user_id))
            {
                throw new UserActionException("user id must be numeric");
            }
        }

        // getting the user data
        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $this->data = $user_factory->select_first($user_id);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
Example #3
0
 public function __construct()
 {
     $this->logger =& FCore::GetLogger();
     $this->pipeline = array_values($this->get_pipeline());
     $this->file_root =& $this->get_file_root();
     $this->auto_routes =& $this->get_auto_route_paths();
 }
Example #4
0
 /**
  *
  * @param <type> $logger
  */
 public function  __construct()
 {
     $this->logger = FCore::GetLogger();
     if ($this->logger != null)
     {
         $this->logger->log(Logger::LEVEL_TRACE, __FUNCTION__." called");
     }
 }
Example #5
0
    public function ready_master()
    {
        $page = FCore::LoadMaster();

        $page->apply_string("title", "Boyds Nest");
        $page->apply_string("meta", "");
        $page->apply_string("javascript", "");

        return $page;
    }
Example #6
0
    public function ready_master()
    {
        $page = FCore::LoadMaster();

        $page->apply_string("title", "Boyds Nest");
        $page->apply_string("meta", "");
        $page->apply_string("style", Html::CssInclude(BN_URL_CSS . "/index.css"));
        $page->apply_string("javascript", "");

        return $page;
    }
 public function collect()
 {
     $this->manual_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if (!$this->manual_factory)
     {
         throw new UserActionException(
                 "Cannot Connect To The Usermanual DB");
     }
     $this->page_id = IsSetPost(USERMANUAL_PAGEID);
     if (!$this->page_id)
     {
         throw new UserActionException(
                 "A Page Must Be Selected To Delete");
     }
 }
 public function collect()
 {
     $conn =& FCore::GetDefaultConnection();
     $this->rank = $conn->quick_query(
             "SELECT max(".USERMANUAL_RANK.") FROM ".USERMANUAL, true);
     if (!$this->rank)
     {
         $this->rank = 1;
     }
     else
     {
         $this->rank = $this->rank[0]["max(".USERMANUAL_RANK.")"];
         $this->rank++;
     }
 }
Example #9
0
 public function validate()
 {
     $this->user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
     $user = $this->user_factory->select_first(
             array(
                 array(
                     DBFactory::ID_KEY   => USERS_USERNAME,
                     DBFactory::ID_SIGN  => "=",
                     DBFactory::ID_VAL   => $this->username
                 )
             ),
             array(
                 DBFactory::SELECT_GET_ONLY => array(
                     USERS_USERID,
                     USERS_USERNAME,
                     USERS_PASSWORD,
                     USERS_SALT,
                     USERS_ISACTIVE
                 )
             )
         );
     if ($user == null)
     {
         if (isset($_SESSION[SESSION_LOGIN_ATTEMPTS]))
         {
             $_SESSION[SESSION_LOGIN_ATTEMPTS]++;
         }
         else
         {
             $_SESSION[SESSION_LOGIN_ATTEMPTS] = 1;
         }
         $this->invalid_login_attempt();
     }
     if (!$user[USERS_ISACTIVE])
     {
         DBLogger::log(BN_LOGTYPE_FAILEDLOGIN,
                 "inactive user ".$user[USERS_USERNAME]." attempted to log in");
     }
     if (!BoydsnestSession::GetInstance()->CheckLoginAttempt(
             $user[USERS_USERNAME],
             $this->password,
             $user[USERS_SALT],
             $user[USERS_PASSWORD]))
     {
         $this->invalid_login_attempt();
     }
     $this->user_id = $user[USERS_USERID];
 }
    public function __construct()
    {
        $user_id = IsSetPost(USERS_USERID);
        if (!$user_id)
        {
            throw new UserActionException("a user must be selected to update");
        }
        if (!is_numeric($user_id))
        {
            throw new UserActionException("a user id must be numeric");
        }

        $password = IsSetPost(USERS_PASSWORD);
        if (!$password)
        {
            throw new UserActionException("a password must be set");
        }
        if (!is_string($password))
        {
            throw new UserActionException("a password must a string");
        }
        if (strlen($password) > 20)
        {
            throw new UserActionException("a password cannot be longer than 20 characters");
        }
        if (strlen($password) < 5)
        {
            throw new UserActionException("a password cannot be shorter than 5 characters");
        }
        
        $new_data[USERS_SALT] = GetNewSalt();
        $new_data[USERS_PASSWORD] = GetSecondOrderHash(
                $password,
                $new_data[USERS_SALT]);

        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $user_factory->update($new_data, $user_id);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
Example #11
0
 public static function SetCount($key, $count)
 {
     try
     {
         $db =& FCore::GetDefaultConnection();
         $db->quick_query(
                 "INSERT INTO ".self::FCORE_COUNTER." SET
                     ".self::NAME."='$key', ".self::COUNT."=$count
                  ON DUPLICATE KEY UPDATE ".self::COUNT."=$count");
         $db->commit();
         return $count;
     }
     catch(Exception $e)
     {
         $db->rollback();
         throw new DBCounterException($e->getMessage());
     }
 }
Example #12
0
    public function do_create()
    {
        $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
        $data_rules = $user_factory->get_db_data_rules(
                DataRules::METHOD_POST, false);
        $this->data = GrabDataFromGlobal($data_rules);

        $this->data[USERS_ISMASTER]       = "0";
        $this->data[USERS_SCHEMEUSING]    = 'default';
        $this->data[USERS_CREATEDWHEN]    = array(
            DBFactory::INSERT_ESCAPE_VAL    => false,
            DBFactory::INSERT_QUOTE         => false,
            DBFactory::INSERT_VALUE         => "NOW()"
        );

        $password = IsSetPost(USERS_PASSWORD);
        $this->data[USERS_SALT]     = GetNewSalt();
        $this->data[USERS_PASSWORD] = GetSecondOrderHash($password, $this->data[USERS_SALT]);

        try
        {
            $data_rules->validate_data($this->data);
        }
        catch(Exception $e)
        {
            $this->data[USERS_PASSWORD] = $password;
            throw new UserActionException($e->getMessage());
        }

        try
        {
            $this->data[USERS_USERID] = $user_factory->insert($this->data);
        }
        catch(DBFactoryException $e)
        {
            $this->data[USERS_PASSWORD] = $password;
            throw new UserActionException($e->getPrevious()->getMessage());
        }
        catch(Exception $e)
        {
            $this->data[USERS_PASSWORD] = $password;
            throw new UserActionException($e->getMessage());
        }
    }
 public function __construct()
 {
     parent::__construct();
     try
     {
         $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
         $this->data = $user_factory->select(
                 array(
                     array(
                         DBFactory::ID_KEY => USERS_USERNAME,
                         DBFactory::ID_SIGN => "!=",
                         DBFactory::ID_VAL => "guest",
                     ),
                     "AND",
                     array(
                         DBFactory::ID_KEY => USERS_USERNAME,
                         DBFactory::ID_SIGN => "!=",
                         DBFactory::ID_VAL => "system",
                     ),
                     "AND",
                     array(
                         DBFactory::ID_KEY => USERS_USERID,
                         DBFactory::ID_SIGN => "!=",
                         DBFactory::ID_VAL => BoydsnestSession::GetInstance()->get(USERS_USERID),
                     ),
                     "AND",
                     array(
                         DBFactory::ID_KEY => USERS_ISACTIVE,
                         DBFactory::ID_SIGN => "=",
                         DBFactory::ID_VAL => 1,
                     ),
                 ),
                 array(
                     DBFactory::SELECT_GET_ONLY => array(
                         USERS_USERID, USERS_USERNAME, USERS_DEFAULTRIGHT
                     ),
                     DBFactory::SELECT_ORDER_BY => USERS_USERNAME
                 ));
     }
     catch(Exception $e)
     {
         throw new DataCollection($e->getMessage());
     }
 }
    public function __construct()
    {
        $user_id = IsSetPost(USERS_USERID);
        if (!$user_id)
        {
            throw new UserActionException("a user must be selected to update");
        }
        if (!is_numeric($user_id))
        {
            throw new UserActionException("a user id must be numeric");
        }

        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $rules = $user_factory->get_db_data_rules(DataRules::METHOD_POST);

            $rule_keys = $rules->get_rule_keys();
            foreach($rule_keys as $key)
            {
                if ($key != USERS_EMAIL &&
                    $key != USERS_SECRETANSWER &&
                    $key != USERS_SECRETQUESTION &&
                    $key != USERS_SCHEMEUSING)
                {
                    $rules->remove_rule($key);
                }
            }

            $data = $rules->get_global_data_and_validate();

            $user_factory->update($data, $user_id);
        }
        catch(ValidationException $e)
        {
            throw new UserActionException($e->getMessage());
        }
        catch(DBFactoryException $e)
        {
            throw new UserActionException(
                    "An Error Occurred While Trying To Update The Profile",
                    $e);
        }
    }
Example #15
0
    public function __construct()
    {
        $user_id = IsSetPost(USERS_USERID);
        if (!$user_id)
        {
            throw new UserActionException("a user must be selected to update");
        }
        if (!is_numeric($user_id))
        {
            throw new UserActionException("a user id must be numeric");
        }

        $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
        $data_rules = $user_factory->get_db_data_rules(
                DataRules::METHOD_POST, true);

        $data_rules->remove_rule(USERS_USERID);
        $data_rules->remove_rule(USERS_USERNAME);
        $data_rules->remove_rule(USERS_PASSWORD);
        $data_rules->remove_rule(USERS_SALT);
        $data_rules->remove_rule(USERS_LASTUPDATE);
        $data_rules->remove_rule(USERS_CREATEDWHEN);
        $data_rules->remove_rule(USERS_ISMASTER);

        $data = false;
        try
        {
            $data = $data_rules->get_global_data_and_validate();
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }

        try
        {
            $user_factory->update($data, $user_id);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
 public function collect()
 {
     $manual_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if (!$manual_factory)
     {
         throw new UserActionException("Cannot Load Usermanual DB");
     }
     $this->data = $manual_factory->select(null,
             array(
                 DBFactory::SELECT_GET_ONLY => array(
                     USERMANUAL_PAGEID, USERMANUAL_TITLE, USERMANUAL_RANK
                 ),
                 DBFactory::SELECT_ORDER_BY => USERMANUAL_RANK
         ));
     if (!$this->data)
     {
         throw new UserActionException("No Data In The Usermanual DB");
     }
 }
 public function collect()
 {
     $this->manual_factory =&
             FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if (!$this->manual_factory)
     {
         throw new UserActionException(
                 "Cannot Connect To Usermanual DB");
     }
     $this->page_id = IsSetPost(USERMANUAL_PAGEID);
     $this->page_content = IsSetPost(USERMANUAL_CONTENT);
     if ($this->page_id === false || 
         $this->page_id === '' ||
         $this->page_content === false)
     {
         throw new UserActionException(
                 "Must Specify Content And A Page ID");
     }
 }
 public function collect()
 {
     $this->manual_factory =
             FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if ($this->manual_factory == null)
     {
         throw new UserActionException(
                 "Cannot Load The Usermanual DB");
     }
     $this->data[USERMANUAL_TITLE]   = IsSetPost(USERMANUAL_TITLE);
     $this->data[USERMANUAL_RANK]    = IsSetPost(USERMANUAL_RANK);
     if ($this->data[USERMANUAL_TITLE] === false ||
         $this->data[USERMANUAL_RANK] === false ||
         $this->data[USERMANUAL_TITLE] === '' ||
         $this->data[USERMANUAL_RANK] === '')
     {
         throw new UserActionException(
                 "All Required Data Must Be Inserted");
     }
 }
Example #19
0
    public function __construct()
    {
        parent::__construct();

        $user_factory = false;
        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $this->data = $user_factory->select(
                    array(
                        array(
                            DBFactory::ID_KEY   => USERS_USERNAME,
                            DBFactory::ID_SIGN  => "!=",
                            DBFactory::ID_VAL   => "system"
                        ),
                        "AND",
                        array(
                            DBFactory::ID_KEY   => USERS_USERNAME,
                            DBFactory::ID_SIGN  => "!=",
                            DBFactory::ID_VAL   => "Guest"
                        ),
                        "AND",
                        array(
                            DBFactory::ID_KEY   => USERS_USERID,
                            DBFactory::ID_SIGN  => "!=",
                            DBFactory::ID_VAL   => BoydsnestSession::GetInstance()->get(USERS_USERID)
                        ),
                    ),
                    array(
                        DBFactory::SELECT_GET_ONLY => array(
                            USERS_USERID, USERS_USERNAME, USERS_CREATEDWHEN,
                            USERS_ISACTIVE, USERS_LASTUPDATE, USERS_ISLOGGED
                        )
                    ));
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
Example #20
0
    public function collect()
    {
        try
        {
            $this->user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }

        // initial try to get the required data to do the action
        $this->start = IsSetGet('start');
        $this->amount = IsSetGet('amount');

        // if any of them are false, then attempt post data
        if ($this->start === false || $this->amount === false)
        {
            $this->start = IsSetPost('start');
            $this->amount = IsSetPost('amount');
        }

        // if still any are false, do default values
        if ($this->start === false || $this->amount === false)
        {
            $this->start = 0;
            $this->amount = 40;
        }

        // now check to make sure that all of them are numeric
        if (!is_numeric($this->start))
        {
            throw new UserActionException('start must be numeric');
        }
        if (!is_numeric($this->amount))
        {
            throw new UserActionException('amount must be numeric');
        }
    }
Example #21
0
    public function __construct()
    {
        // getting the user id
        $user_id = IsSetPost(USERS_USERID);
        if (!$user_id)
        {
            throw new UserActionException("no user selected");
        }
        if (!is_numeric($user_id))
        {
            throw new UserActionException("user id must be numeric");
        }

        // getting the user factory
        $user_factory;
        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }

        // actually deleting
        try
        {
            $user_factory->delete($user_id);
            $page_ids = DBForum::DeleteForum(BN_DATATYPE_USERPAGES, $user_id);
            foreach($page_ids as $page_id)
            {
                DBForum::DeleteForum(BN_DATATYPE_PAGERESPONSES, $page_id);
            }
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
 public function collect()
 {
     $this->manual_factory =&
             FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if (!$this->manual_factory)
     {
         throw new UserActionException(
                 "Cannot Connect To Usermanual DB");
     }
     $this->page_id = IsSetPost(USERMANUAL_PAGEID);
     $this->page_title = IsSetPost(USERMANUAL_TITLE);
     $this->page_rank = IsSetPost(USERMANUAL_RANK);
     if ($this->page_id === false || 
             $this->page_title === false ||
             $this->page_rank === false ||
             $this->page_id === '' ||
             $this->page_title === '' ||
             $this->page_rank === '')
     {
         throw new UserActionException(
                 "Must Specify Page Rank, Title And ID");
     }
 }
Example #23
0
    public function __construct()
    {
        parent::__construct();

        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $rules = $user_factory->get_db_data_rules();

            foreach($rules->get_rule_keys() as $key)
            {
                $rule = $rules->get_rule($key);
                if (isset($rule[DataRules::DEFAULT_]))
                {
                    $this->data[$key] = $rule[DataRules::DEFAULT_];
                }
            }
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
 public function collect()
 {
     $manual_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMANUALMODEL);
     if (!$manual_factory)
     {
         throw new UserActionException("Cannot Load Usermanual DB");
     }
     $page_id = IsSetGet(USERMANUAL_PAGEID);
     if (!$page_id)
     {
         $page_id = IsSetPost(USERMANUAL_PAGEID);
     }
     if (!$page_id)
     {
         $this->data = $manual_factory->select_first(array(
                 array(
                     DBFactory::ID_ESCAPE=> false,
                     DBFactory::ID_KEY   => USERMANUAL_RANK,
                     DBFactory::ID_SIGN  => "=",
                     DBFactory::ID_VAL   => "(SELECT min(".USERMANUAL_RANK.") FROM ".USERMANUAL.")"
                 )
             ));
         if (!$this->data)
         {
             throw new UserActionException("No Usermanual Pages Found");
         }
     }
     else
     {
         $this->data = $manual_factory->select_first($page_id);
         if (!$this->data)
         {
             throw new UserActionException(
                     "Cannot Find Usermanual Page With Requested ID");
         }
     }
 }
Example #25
0
    public function __construct()
    {
        $new_master_id = IsSetPost(USERS_USERID);
        if (!$new_master_id)
        {
            throw new UserActionException("a user must be selected to update");
        }
        if (!is_numeric($new_master_id))
        {
            throw new UserActionException("a user id must be numeric");
        }

        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            $user_factory->update(array(USERS_ISMASTER => "0"), "");
            $user_factory->update(array(USERS_ISMASTER => "1"), $new_master_id);
            BoydsnestSession::GetInstance()->set(USERS_ISMASTER, 0);
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }
Example #26
0
<?php

require_once FCORE_FILE_BBCONSUMER;

$viewer = array();
$viewer['title']    = isset($title) && is_string($title) ?
                            $title :
                            "No Title";
$viewer['content']  = isset($content) && is_string($content) ?
                            BBConsumer::consume($content) :
                            "No Content";

echoln();
echoln();

echo FCore::LoadViewPHP("content/BasicTextViewer", $viewer);

echoln();
echoln();

echo $responses;

echoln();
echoln();

?>
Example #27
0
<?php

require_once '../../Boydsnest.php';
require_once FCORE_FILE_DBFACTORY;

header("Content-type: text/css");

$name = IsSetGet("name", "default");

FCore::$LOG_TO_HTML = false;

$scheme = FCore::LoadDBFactory(BN_DBFACTORY_SCHEMEMODEL);
$scheme_instance = $scheme->select_first(
        array(
            array(DBFactory::ID_KEY => SCHEME_SCHEMENAME,
                  DBFactory::ID_SIGN => "=",
                  DBFactory::ID_VAL => $name)
        ));

if ($scheme_instance == null){
    $scheme_instance = $scheme->select_first(
        array(
            array(DBFactory::ID_KEY => SCHEME_SCHEMENAME,
                  DBFactory::ID_SIGN => "=",
                  DBFactory::ID_VAL => "default"
            )
        ));

    if ($scheme_instance == null){
        echo "Error: no data found in database";
        return;
Example #28
0
 private function __construct($forum_data)
 {
     $this->forum_id         = $forum_data[self::FORUM_ID];
     $this->post_datatype    = $forum_data[self::POSTDATATYPE];
     $this->time_made        = $forum_data[self::TIMEMADE];
     $this->last_used        = $forum_data[self::LASTUSED];
     $this->origin_type      = $forum_data[self::ORIGIN_TYPE];
     $this->origin_id        = $forum_data[self::ORIGIN_ID];
     $this->metadata         = $forum_data[self::METADATA];
     $this->db               =& FCore::GetDefaultConnection();
 }
Example #29
0
    public function list_pages($request, $message = '')
    {
        FCore::LoadObject("security/IsMasterSecurityCheck");
        if ($request == ACTION.ACTION_UPDATE ||
                $request == ACTION.ACTION_DELETE)
        {
            try
            {
                if ($request == ACTION.ACTION_UPDATE)
                {
                    $this->load_local_object("actions/UpdateUserManualPage");
                    $message = "Successfully Updated A Usermanaul Page";
                }
                else
                {
                    $this->load_local_object("actions/DeleteUserManualPage");
                    $message = "Successfully Deleted A Usermanual Page";
                }
            }
            catch(UserActionException $e)
            {
                if ($this->logger != null)
                {
                    $this->logger->log(
                            Logger::LEVEL_WARN,
                            $e->getMessage(),
                            $e->getFile(), $e->getLine());
                }
                $message = $e->getMessage();
            }
            catch(ValidationException $e)
            {
                if ($this->logger != null)
                {
                    $this->logger->log(
                            Logger::LEVEL_WARN,
                            $e->getMessage(),
                            $e->getFile(), $e->getLine());
                }
                $message = $e->getMessage();
            }
            catch(Exception $e)
            {
                if ($this->logger != null)
                {
                    $this->logger->log(
                            Logger::LEVEL_ERROR,
                            $e->getMessage(),
                            $e->getFile(), $e->getLine());
                }
                $message = "An Unexpected Error Occurred: Please Contact The Admin";
            }
        }

        $pagelist;
        try
        {
            $pagelist = $this->load_local_object("actions/GetUserManualPageList");
            $pagelist = $pagelist->get_data();
        }
        catch(UserActionException $e)
        {
            if ($this->logger != null)
            {
                $this->logger->log(
                        Logger::LEVEL_WARN,
                        $e->getMessage(),
                        $e->getFile(), $e->getLine());
            }
            $pagelist = $e->getMessage();
        }

        $page = $this->ready_master($request);
        $page->consume_string(
                "content",
                $this->load_local_php_view(
                        "views/infolist",
                        array(
                            'pagelist'  => $pagelist,
                            'message'   => $message,
                        )));
        return $page->get_page();
    }
Example #30
0
    public function __construct($user_id = false)
    {
        parent::__construct();

        $user_factory = false;
        try
        {
            $user_factory =& FCore::LoadDBFactory(BN_DBFACTORY_USERMODEL);
            if (!$user)
            {
                $this->data = $user_factory->select(
                        array(
                            array(
                                DBFactory::ID_KEY => USERS_USERNAME,
                                DBFactory::ID_SIGN => "!=",
                                DBFactory::ID_VAL => "guest"
                            ),
                            "AND",
                            array(
                                DBFactory::ID_KEY => USERS_USERNAME,
                                DBFactory::ID_SIGN => "!=",
                                DBFactory::ID_VAL => "system"
                            ),
                            "AND",
                            array(
                                DBFactory::ID_KEY => USERS_ISACTIVE,
                                DBFactory::ID_SIGN => "=",
                                DBFactory::ID_VAL => 1
                            ),
                            "AND",
                            array(
                                DBFactory::ID_KEY => USERS_USERID,
                                DBFactory::ID_SIGN => "!=",
                                DBFactory::ID_VAL =>
                                    BoydsnestSession::GetInstance()->get(USERS_USERID)
                            ),
                        ),
                        array(
                            DBFactory::SELECT_GET_ONLY => array(
                                USERS_USERID, USERS_USERNAME
                            ),
                            DBFactory::SELECT_ORDER_BY => USERS_USERNAME
                        ));
            }
            else
            {
                $this->data = $user_factory->select(
                        $user_id,
                        array(
                            DBFactory::SELECT_GET_ONLY => array(
                                USERS_USERID, USERS_USERNAME
                            ),
                            DBFactory::SELECT_ORDER_BY => USERS_USERNAME
                        ));
            }
        }
        catch(Exception $e)
        {
            throw new UserActionException($e->getMessage());
        }
    }