PHP User::allAsArray Examples

PHP User::allAsArray - 4 examples found. These are the top rated real world PHP examples of User::allAsArray extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
          echo "(no sushi services set up)";
      }
      break;
      //display user info for admin screen
  //display user info for admin screen
  case 'getAdminUserList':
      $instanceArray = array();
      $user = new User();
      $tempArray = array();
      $config = new Configuration();
      if (count($user->allAsArray()) > 0) {
          ?>
	<table class='dataTable' style='width:550px'>
		<tr>
		<th>Login ID</th>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Privilege</th>
		<th>&nbsp;</th>
		<th>&nbsp;</th>
		<?php 
          foreach ($user->allAsArray() as $instance) {
              $privilege = new Privilege(new NamedArguments(array('primaryKey' => $instance['privilegeID'])));
              echo "<tr>";
              echo "<td>" . $instance['loginID'] . "</td>";
              echo "<td>" . $instance['firstName'] . "</td>";
              echo "<td>" . $instance['lastName'] . "</td>";
              echo "<td>" . $privilege->shortName . "</td>";
              echo "<td style='width:30px'><a href='ajax_forms.php?action=getAdminUserUpdateForm&loginID=" . $instance['loginID'] . "&height=196&width=248&modal=true' class='thickbox' id='expression'>update</a></td>";
              echo "<td style='width:50px'><a href='javascript:deleteUser(\"" . $instance['loginID'] . "\")'>remove</a></td>";
              echo "</tr>";
          }
<?php

if (isset($_GET['userGroupID'])) {
    $userGroupID = $_GET['userGroupID'];
} else {
    $userGroupID = '';
}
$userGroup = new UserGroup(new NamedArguments(array('primaryKey' => $userGroupID)));
//get all users for output in drop down
$allUserArray = array();
$userObj = new User();
$allUserArray = $userObj->allAsArray();
//get users already set up for this user group in case it's an edit
$ugUserArray = $userGroup->getUsers();
?>
		<div id='div_userGroupForm'>
		<form id='userGroupForm'>
		<input type='hidden' name='editUserGroupID' id='editUserGroupID' value='<?php 
echo $userGroupID;
?>
'>

		<div class='formTitle' style='width:280px; margin-bottom:5px;position:relative;'><span class='headerText'><?php 
if ($userGroupID) {
    echo _("Edit User Group");
} else {
    echo _("Add User Group");
}
?>
</span></div>
<?php

$instanceArray = array();
$user = new User();
$tempArray = array();
foreach ($user->allAsArray() as $tempArray) {
    $privilege = new Privilege(new NamedArguments(array('primaryKey' => $tempArray['privilegeID'])));
    $tempArray['priv'] = $privilege->shortName;
    array_push($instanceArray, $tempArray);
}
if (count($instanceArray) > 0) {
    ?>
			<div class="adminRightHeader">Users</div>
			<table class='linedDataTable' style='width:570px;margin-bottom:5px;'>
				<tr>
				<th>Login ID</td>
				<th>First Name</td>
				<th>Last Name</td>
				<th>Privilege</td>
				<th>View Accounts</td>
				<th>Email Address</td>
				<th>&nbsp;</td>
				<th>&nbsp;</td>
				</tr>
				<?php 
    foreach ($instanceArray as $instance) {
        if ($instance['accountTabIndicator'] == '1') {
            $accountTab = 'Y';
        } else {
            $accountTab = 'N';
        }
Example #4
0
**
** This file is part of CORAL.
**
** CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
**
** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with CORAL.  If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
include_once 'directory.php';
switch ($_GET['action']) {
    case 'getUsers':
        $userObj = new User();
        $usersArray = $userObj->allAsArray();
        if (count($usersArray) > 0) {
            ?>
			<table class='linedDataTable' style='width:327px;'>
				<tr>
				<th>Login ID</th>
				<th>Admin?</th>
				<th style='width:20px;'>&nbsp;</th>
				<th style='width:20px;'>&nbsp;</th>
				</tr>
				<?php 
            foreach ($usersArray as $userArray) {
                if ($userArray['adminInd'] == 'Y' || $userArray['adminInd'] == '1') {
                    $isAdmin = 'Y';
                } else {
                    $isAdmin = 'N';