PHP Method User::editUser, codiad Code Examples

This page contains top rated real world PHP examples of method User::editUser from package codiad extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: user.controller.php Project: xXNoceboXx/WUS
0
function editUser($id, $name, $login, $pass, $valid)
{
    global $bdd, $_TABLES;
    if (!is_null($bdd) && !is_null($_TABLES)) {
        $objUser = new User($bdd, $_TABLES);
        $objUser->editUser($id, $name, $login, $pass, $valid);
    } else {
        error_log("BDD ERROR : " . json_encode($bdd));
        error_log("TABLES ERROR : " . json_encode($_TABLES));
    }
}
Example #2
Show file File: FranchiseeAdministration.php Project: Headrun-php/TLG
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function viewUser($id)
 {
     $currentPage = "USERS";
     $mainMenu = "USERS_MAIN";
     $inputs = Input::all();
     if (isset($inputs['firstName'])) {
         $userEditResult = User::editUser($id, $inputs);
         if ($userEditResult) {
             Session::flash('msg', "User details has been edited Successfully.");
             return Redirect::to('admin/users/view/' . $userEditResult->id);
         }
     }
     $User = User::getUsersByUserId($id);
     $User = $User['0'];
     //$data = array('Users','currentPage', 'mainMenu');
     return View::make('pages.users.useredit', compact('User', 'currentPage', 'mainMenu'));
 }
Example #3
Show file File: user_page.php Project: TomaszKawalkowski/shop
0
    if (isset($_POST['first_name_edit']) && strlen(trim($_POST['first_name_edit']))) {
        $first_name = trim($_POST['first_name_edit']);
        $n = 1;
        //zmienne do podania b��d�w u�ytkownika przy rejestracji
    }
    $email = $loggedUser->getEmail();
    if (isset($_POST['last_name_edit']) && strlen(trim($_POST['last_name_edit']))) {
        $last_name = trim($_POST['last_name_edit']);
        $n = 1;
        //zmienne do podania b��d�w u�ytkownika przy rejestracji
    }
    if (isset($_POST['address_edit']) && strlen(trim($_POST['address_edit']))) {
        $address = trim($_POST['address_edit']);
        $e = 1;
    }
    $loggedUser = User::editUser($first_name, $last_name, $email, $address);
    if ($loggedUser != false) {
        $_SESSION['user'] = $loggedUser;
    }
}
require_once 'meta.html';
require_once 'menu.php';
?>


<div class="container">
    <div style="height: 75px;"></div>


    <div class="row">
        <div class="col-sm-2"></div>
Example #4
Show file File: reqEditUser.php Project: JhunCabas/asset-project-system
0
//** CoddingDate : 13/08/2556
//** Credit : นัฐวุฒิ เผือกทอง
//****************************************************************//
//****************************************************************//
//*************** Check Session ****************
session_start();
include_once "../class/User.php";
$user = new User();
if (!$user->getSession()) {
    header("location: ../page/main.php");
}
//**********************************************
include_once "../class/User.php";
$updateUser = new User();
$userId = $_GET["userId"];
$firstName = $_GET["upFname"];
$lastName = $_GET["upLname"];
$position = $_GET["upPosition"];
$stat = $_GET["upStatus"];
if ($stat == "1") {
    $stat = "Administrator";
    $updateUser->setValues(null, null, $firstName, $lastName, $position, $stat);
    $updateUser->editUser($userId);
} else {
    if ($stat == "2") {
        $stat = "Officer";
        $updateUser->setValues(null, null, $firstName, $lastName, $position, $stat);
        $updateUser->editUser($userId);
    } else {
    }
}
Example #5
Show file File: request.php Project: wongcw30/PixAlbums4U
0
        return (array) $this;
    }
    function editPhoto($description, $photoDate)
    {
        $this->description = $description;
        $this->photoDate = $photoDate;
    }
}
if (isset($_POST['getUser'])) {
    $user = new User($_POST['getUser']);
    $statement = $user;
    //$statement = $user->getUser();
} else {
    if (isset($_POST['editUser'])) {
        $user = new User($_POST['editUser']);
        $statement = $user->editUser($_POST['username'], $_POST['fname'], $_POST['email'], $_POST['password']);
    } else {
        if (isset($_POST['getAlbum'])) {
            $user = new User($_POST['getAlbum']);
            $statement = $user->getAlbum($_POST['i']);
        } else {
            if (isset($_POST['editAlbum'])) {
                $user = new User($_POST['editAlbum']);
                $user->editAlbum($_POST['i'], $_POST['albumName'], $_POST['description']);
                $statement = true;
            } else {
                if (isset($_POST['addAlbum'])) {
                    $user = new User($_POST['addAlbum']);
                    $statement = $user->addAlbum($_POST['albumName'], $_POST['description']);
                } else {
                    if (isset($_POST['getPhoto'])) {
Example #6
Show file File: reqEditUser.php Project: JhunCabas/asset-project-system
0
<?php

include_once "../class/User.php";
$updateUser = new User();
//$updateUser->setValues(null,null,"xxx","xxx","xxx","Officer");
//$updateUser->setValues(null,null,$firstName,$lastName,$position,$stat);
//$updateUser->editUser(12);
$id = $_GET["id"];
$firstName = $_GET["upFname"];
$lastName = $_GET["upLname"];
$position = $_GET["upPosition"];
$stat = $_GET["upStatus"];
if ($stat == "1") {
    $stat = "Administrator";
    $updateUser->setValues(null, null, $firstName, $lastName, $position, $stat);
    $updateUser->editUser($id);
} else {
    if ($stat == "2") {
        $stat = "Officer";
        $updateUser->setValues(null, null, $firstName, $lastName, $position, $stat);
        $updateUser->editUser($id);
    } else {
    }
}
Example #7
Show file File: editprofile.php Project: ronayumik/Laboratory-Recruitment-Project---Am-I-Safe
0
"  required ></label>
	                        </p>
	                        <p>
	                        <label>Profile Picture :  <input type="file" name="photo" id="photo" ></label>
	                        </p>
	                        <p>
	                        	<label>New Password :  <input type="password" name="newpass" required ></label>
	                        </p>

	                        <div id="validation">
		                         <p>
		                        <label>Old-Password <input type="password" name="oldpass" required></label>
		                        </p>
	                        </div>
	                        
	                        <button type="submit" name="editprofil">Edit Profil</button>
	                        <?php 
if (isset($_POST['editprofil'])) {
    $user->editUser();
}
?>
	
	                </form>
            </div>
        </div>
        
    </div>

</body>
    
</html>
Example #8
Show file File: edit.php Project: hoannc54/WebBanHang
0
 * Date: 11/4/2015
 * Time: 8:04 PM
 */
//Khởi động session
session_start();
//Kiểm tra nếu chưa đăng nhập thì quay về trang đăng nhập
if (!isset($_SESSION['user'])) {
    header('location:login.php');
}
//Require các file cần thiết
require '../../config/Config.php';
require '../../models/User.php';
//Lấy user_id từ URL
$user_id = $_GET['user_id'];
//Khởi tạo đối tượng thành viên (User)
$userModel = new User();
if ($_POST) {
    //Nhận dữ liệu từ form và gán vào một mãng
    $data = array('username' => $_POST['username'], 'password' => empty($_POST['password']) ? null : md5($_POST['password']), 'fullname' => $_POST['fullname'], 'email' => $_POST['email'], 'status' => isset($_POST['status']) ? 1 : 0, 'modified' => date('Y-m-d H:i:s'));
    //Cập nhật
    if ($userModel->editUser($data, $user_id)) {
        //Tạo session để lưu cờ thông báo thành công
        $_SESSION['success'] = true;
        //Tải lại trang (Mục đích là để tải lại thông tin mới)
        //header('location:edit.php?user_id=' . $user_id);
        //Ngừng thực thi
        exit;
    }
}
$user = $userModel->getUserById($user_id);
require '../../views/user/v_edit.php';
Example #9
Show file File: admin_controller.php Project: ryderonil/sisurip
0
 public function updateRekamUser()
 {
     $user = new User();
     $user->set('id_user', $_POST['id']);
     $user->set('namaPegawai', $_POST['namaPegawai']);
     $user->set('NIP', $_POST['NIP']);
     $user->set('nama_user', $_POST['username']);
     $user->set('password', Hash::create('md5', $_POST['password'], HASH_SALT_KEY));
     $user->set('bagian', $_POST['bagian']);
     $user->set('jabatan', $_POST['jabatan']);
     $user->set('role', $_POST['role']);
     $user->set('active', 'Y');
     //harusnya post aktif
     /*$data = array(
           'namaPegawai' => $_POST['namaPegawai'],
           'NIP' => $_POST['NIP'],
           'username' => $_POST['username'],
           'password' => Hash::create('md5', $_POST['password'], HASH_SALT_KEY),
           'bagian' => $_POST['bagian'],
           'jabatan' => $_POST['jabatan'],
           'role' => $_POST['role'],
           'active' => 'Y'
       );*/
     //        $where = ' id_user=' . $_POST['id'];
     //        $this->model->updateUser($data, $where);
     //        $this->rekamUser();
     if ($user->editUser()) {
         echo json_encode(array('status' => 'success', 'message' => '<div id=success>Ubah data pengguna atas nama ' . $_POST['namaPegawai'] . ' berhasil</div>'));
     } else {
         echo json_encode(array('status' => 'error', 'message' => '<div id=error>Ubah data pengguna atas nama ' . $_POST['namaPegawai'] . ' gagal</div>'));
     }
 }
Example #10
Show file File: users.php Project: ringmaster/CandyCMS
0
	<?php 
    if (isset($_POST['adduser'])) {
        ?>
		<?php 
        User::addUser($_POST['username'], $_POST['name'], $_POST['email'], $_POST['password'], $_POST['role']);
        ?>
		<p class="message success">User Added</p>
	<?php 
    }
    ?>
	
	<?php 
    if (isset($_POST['edituser'])) {
        ?>
		<?php 
        User::editUser($_POST['userid'], $_POST['username'], $_POST['name'], $_POST['email'], $_POST['role']);
        ?>
		<p class="message success">User Edited Successfully</p>	
	<?php 
    }
    ?>
	
	<?php 
    if (isset($_GET['delete'])) {
        ?>
		<?php 
        User::deleteUser($_GET['delete']);
        ?>
		<p class="message success">User Deleted</p>
	<?php 
    }
Example #11
Show file File: userFunc.php Project: neequole/sp2
0
function editUser()
{
    $user = new User();
    $user->storeFormValues($_POST);
    $user->editUser();
}
Example #12
Show file File: UserController.php Project: sov-20-07/billing
0
 function actedituser()
 {
     $model = new User();
     $model->editUser();
     $this->redirect('/user/user/');
 }