本文整理汇总了PHP中UserClass::UpdateUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserClass::UpdateUser方法的具体用法?PHP UserClass::UpdateUser怎么用?PHP UserClass::UpdateUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserClass
的用法示例。
在下文中一共展示了UserClass::UpdateUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UserClass
case "atualizar":
$usr = new UserClass();
$usr->setID($userID);
$usr->setFirstName($firstName);
$usr->setLastName($lastName);
$usr->setGender($gender);
$usr->setEmail($email);
$usr->setGrauDeFormacao($grauDeFormacao);
$usr->setAfiliacao($afiliacao);
if ($useSGU) {
$usr->setToken($_COOKIE['userToken']);
}
if ($password != "") {
$usr->setPassword($password);
}
$a = $usr->UpdateUser(false);
if ($useSGU) {
$usr->loadUser($_COOKIE['userToken']);
} else {
$usr->loadUser($_COOKIE['userID']);
}
header("Location: " . $ini['this']['relpath'] . "/users/userProfile.php?id=" . $_COOKIE['userID']);
break;
default:
$usr = new UserClass();
$profiles = array(new UserProfileClass(), new UserProfileClass(), new UserProfileClass());
if (isset($_REQUEST['id']) && isset($_COOKIE['userID'])) {
if ($useSGU) {
$usr->loadUser($_COOKIE['userToken']);
} else {
$usr->loadUser($_COOKIE['userID']);
示例2: UserProfileClass
}
if($password != "")
$usr->setPassword($password);
for($i = 0; $i < count($profilesTexts); $i ++){
$profile = new UserProfileClass();
$profile->setUserID($userID);
$profile->setProfileID($profileid[$i]);
$profile->setProfileText($profilesTexts[$i]);
$profile->setProfileName($profilesNames[$i]);
$profile->setProfileStatus('on');
$usr->setProfiles($profile);
}
$a = $usr->UpdateUser();
if($useSGU){
$usr->loadUser($_COOKIE['userToken']);
}else{
$usr->loadUser($_COOKIE['userID']);
}
$profiles = $usr->getProfiles();
break;
default:
$usr = new UserClass();
$profiles = array(new UserProfileClass(), new UserProfileClass(), new UserProfileClass());
if(isset($_REQUEST['id']) && isset($_COOKIE['userID']))
示例3:
$objUser->phone="";
}
if(isset($_POST['department'])&&$_POST['department']!=""){
$department=$_POST['department'];
$objUser->department=$department;
}
else{
$objUser->department="";
}
if(isset($_POST['active'])&&$_POST['active']>=0){
$active=$_POST['active'];
}
$objUser->active=$active;
if(isset($_POST['id'])&&$_POST['id']!=""){
$userid=$_POST['id'];
$objUser->id=$userid;
$msg=$objUser->UpdateUser();
}
else
{
$msg=$objUser->InsertUser();
}
echo $msg."|".$objUser->id."|".$msg;
?>