Пример #1
0
function change_name()
{
    $result = update_name($_POST['name']);
    if ($result) {
        redirect("user/account");
    } else {
        redirect("user/account/update-name-failed");
    }
}
Пример #2
0
 public static function update_user($uid, $attributes)
 {
     $casBackend = OC_USER_CAS::getInstance();
     \OCP\Util::writeLog('cas', 'Updating data of the user: '******'cas', 'attr: ' . implode(",", $attributes), \OCP\Util::DEBUG);
     if (isset($attributes['cas_email'])) {
         update_mail($uid, $attributes['cas_email']);
     }
     if (isset($attributes['cas_name'])) {
         update_name($uid, $attributes['cas_name']);
     }
     if (isset($attributes['cas_groups'])) {
         update_groups($uid, $attributes['cas_groups'], $casBackend->protectedGroups, false);
     }
 }
Пример #3
0
<?php

include "../model/userdb.php";
if ($_POST['method'] == "insert") {
    insert_user();
}
if ($_POST['method'] == "login") {
    get_user_by_username_password();
}
if ($_POST['method'] == "reset") {
    update_name();
    changePass();
    update_add();
    update_phone();
    update_email();
}