Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

user.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: user.php 6235 2001-07-20 11:45:40Z jakobn $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "ezuser/classes/ezuser.php" );
28 // include_once( "ezxmlrpc/classes/ezxmlrpcstruct.php" );
29 // include_once( "ezxmlrpc/classes/ezxmlrpcint.php" );
30 // include_once( "ezxmlrpc/classes/ezxmlrpcstring.php" );
31 // include_once( "ezxmlrpc/classes/ezxmlrpcbool.php" );
32 if( $Command == "list" ) // Return a list of users and their ID's
33 {
34 $userList = eZUser::getAll( "Login", true );
35 $users = array();
36 foreach( $userList as $user )
37 {
38 $users[] = new eZXMLRPCStruct( array( "URL" => createURLStruct( "ezuser", "user", $user->id() ),
39 "Name" => new eZXMLRPCString( $user->login( false ) )
40 )
41 );
42 }
43 $ReturnData = new eZXMLRPCStruct( array( "Catalogues" => array(),
44 "Elements" => $users ) );
45 }
46 else if( $Command == "data" || $Command == "currentuser" )
47 {
48 $user = 0;
49 if( $Command == "data" )
50 {
51 $user = new eZUser( $ID );
52 $cu = false;
53 }
54 else
55 {
56 $user = $User;
57 $cu = true;
58 }
59
60 $ReturnData = new eZXMLRPCStruct( array( "Location" => createURLStruct( "ezuser", "user", $user->id() ),
61 "FirstName" => new eZXMLRPCString( $user->firstName( false ) ),
62 "LastName" => new eZXMLRPCString( $user->lastName( false ) ),
63 "Login" => new eZXMLRPCString( $user->login( false ) ),
64 "EMail" => new eZXMLRPCString( $user->email() ),
65 "InfoSubscription" => new eZXMLRPCBool( $user->infoSubscription() ),
66 "Signature" => new eZXMLRPCString( $user->signature() ),
67 "CookieLogin" => new eZXMLRPCBool( $user->cookieLogin() ),
68 "SimultaneousLogins" => new eZXMLRPCInt( $user->simultaneousLogins() ),
69 "IsCurrentUser" => new eZXMLRPCBool( $cu )
70 )
71 );
72 }
73
74 ?>
eZUser
Definition: ezuser.php:76
eZUser\getAll
static & getAll( $order="Login", $as_object=true, $search=false, $max=-1, $index=0)
Definition: ezuser.php:330
eZXMLRPCBool
Definition: ezxmlrpcbool.php:37
eZXMLRPCInt
Definition: ezxmlrpcint.php:37
eZXMLRPCString
Definition: ezxmlrpcstring.php:37
eZXMLRPCStruct
Definition: ezxmlrpcstruct.php:37
$users
$users
Definition: ezmessage/admin/messageedit.php:138
$ReturnData
$ReturnData
Definition: tag.php:48
$userList
$userList
Definition: trustees.php:80
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.