当前位置: 首页>>代码示例>>PHP>>正文


PHP UserManager::update方法代码示例

本文整理汇总了PHP中UserManager::update方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManager::update方法的具体用法?PHP UserManager::update怎么用?PHP UserManager::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserManager的用法示例。


在下文中一共展示了UserManager::update方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transaction_3

 /**
  * editar detalles de usuario (nombre/correo/contraseña) usuario_editar UID
  * const TRANSACTION_TYPE_EDIT_USER   =  3;
  */
 static function transaction_3($data, $web_service_details)
 {
     $uidIdPersonaId = strtoupper($data['item_id']);
     global $data_list;
     $user_id = self::get_user_id_by_persona_id($uidIdPersonaId, $data_list);
     if ($user_id) {
         $user_info = Migration::soap_call($web_service_details, 'usuarioDetalles', array('intIdSede' => $data['branch_id'], 'uididpersona' => $uidIdPersonaId));
         if ($user_info['error'] == false) {
             unset($user_info['error']);
             //Edit user
             $user_info['user_id'] = $user_id;
             $chamilo_user_info_before = api_get_user_info($user_id, false, false, true);
             UserManager::update($user_info);
             $chamilo_user_info = api_get_user_info($user_id, false, false, true);
             return array('entity' => 'user', 'before' => $chamilo_user_info_before, 'after' => $chamilo_user_info, 'message' => "User id {$user_id} was updated with data: " . print_r($user_info, 1), 'status_id' => self::TRANSACTION_STATUS_SUCCESSFUL);
         } else {
             return $user_info;
         }
     } else {
         return array('message' => "User was not found with uidIdPersona: {$uidIdPersonaId}", 'status_id' => self::TRANSACTION_STATUS_FAILED);
     }
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:26,代码来源:migration.custom.class.php

示例2: UserManager

     break;
 case 'del':
     if (isset($_GET['id'])) {
         $userManager = new UserManager($bdd);
         $userManager->delete($_GET['id']);
         header('Location: ?controler=user&action=list');
     } else {
         header('Location: ?controler=user&action=list');
     }
     break;
 case 'edit':
     if (isset($_POST['login']) && isset($_POST['pass']) && isset($_POST['id'])) {
         $_POST['pass'] = sha1($_POST['pass']);
         $userManager = new UserManager($bdd);
         $user = new User($_POST);
         $userManager->update($user);
         header('Location: ?controler=user&action=list');
     } elseif (isset($_GET['id'])) {
         $userManager = new UserManager($bdd);
         $user = $userManager->get($_GET['id']);
         ob_start();
         require_once 'view/user/edituser.php';
         $content = ob_get_contents();
         ob_end_clean();
         require_once 'view/layout/layout.php';
     }
     break;
 case 'list':
     $userManager = new UserManager($bdd);
     $users = $userManager->getList();
     ob_start();
开发者ID:evangelion62,项目名称:MyPipe,代码行数:31,代码来源:user.php

示例3: array

                    exit;
                }
            }
        } else {
            if ($action == 'logout') {
                session_destroy();
                $_SESSION = array();
                header('Location: index.php');
                exit;
            } else {
                if ($action == 'edit_profil') {
                    if (isset($_POST['login'], $_POST['email'], $_POST['password1'], $_POST['password2'], $_POST['avatar'])) {
                        $manager = new UserManager($db);
                        $currentUser->setLogin($_POST['login']);
                        $currentUser->setEmail($_POST['email']);
                        $currentUser->setPassword($_POST['password1'], $_POST['password2']);
                        $currentUser->setAvatar($_POST['avatar']);
                        $retour = $manager->update($currentUser);
                        if (is_array($retour)) {
                            $errors = array_merge($errors, $retour);
                        } else {
                            $user = $retour;
                            header('Location: index.php?page=profil&id=' . $user->getId() . '');
                            exit;
                        }
                    }
                }
            }
        }
    }
}
开发者ID:Hollux,项目名称:Fennec,代码行数:31,代码来源:traitement_user.php

示例4: array

     }
     echo $twig->render('acquis.html.twig', array('objs' => $wins, 'accessuser' => $_SESSION["co"], 'userco' => $userco));
     break;
     //affiche la page de modification du profil
 //affiche la page de modification du profil
 case "modifProfil":
     $userco = $userManager->get($iduser);
     echo $twig->render('modif_profil.html.twig', array('accessuser' => $_SESSION["co"], 'userco' => $userco));
     break;
     //envoi le formulaire de modif du profil + affiche le profil de la personne
 //envoi le formulaire de modif du profil + affiche le profil de la personne
 case "envoiModifProfil":
     $userco = $userManager->get($iduser);
     $newInfoUser = new Users($_POST);
     $newInfoUser->setIdUser($iduser);
     $modif = $userManager->update($newInfoUser);
     if ($modif) {
         $msg = "Votre profil a bien été modifié";
     } else {
         $msg = "Problème lors de la modification";
     }
     echo $twig->render('index_user.html.twig', array('msg' => $msg, 'accessuser' => $_SESSION["co"], 'userco' => $userco));
     break;
     //affiche un tableau des enchères en cours pour l'utilisateur connecté
 //affiche un tableau des enchères en cours pour l'utilisateur connecté
 case "enchereCours":
     $listIdObj = $enchereManager->getEnchereCours($iduser);
     $userco = $userManager->get($iduser);
     //$objets = $objetsManager->getListDispo($p);
     echo $twig->render('enchere_cours.html.twig', array('accessuser' => $_SESSION["co"], 'userco' => $userco));
     break;
开发者ID:kayneth,项目名称:site_enchere,代码行数:31,代码来源:profil.php

示例5: PipeManager

        require_once 'view/layout/layout.php';
        break;
    case 'del':
        if (isset($_GET['id'])) {
            $pipeManager = new PipeManager($bdd);
            $pipeManager->delete($_GET['id']);
            header('Location: ?controler=pipe&action=list');
        } else {
            header('Location: ?controler=pipe&action=list');
        }
        break;
    case 'edit':
        if (isset($_POST['login']) && isset($_POST['pass']) && isset($_POST['id'])) {
            $_POST['pass'] = sha1($_POST['pass']);
            $pipeManager = new UserManager($bdd);
            $pipe = new User($_POST);
            $pipeManager->update($pipe);
            header('Location: ?controler=pipe&action=list');
        } elseif (isset($_GET['id'])) {
            $pipeManager = new PipeManager($bdd);
            $pipe = $pipeManager->get($_GET['id']);
            ob_start();
            require_once 'view/pipe/edit.php';
            $content = ob_get_contents();
            ob_end_clean();
            require_once 'view/layout/layout.php';
        }
        break;
    default:
        break;
}
开发者ID:evangelion62,项目名称:MyPipe,代码行数:31,代码来源:pipe.php


注:本文中的UserManager::update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。