本文整理汇总了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);
}
}
示例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();
示例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;
}
}
}
}
}
}
}
示例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;
示例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;
}