• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP user类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: adminNotify

 public function adminNotify()
 {
     if ($this->cookie->check("id_user") and $this->cookie->id_user == 1) {
         //no notificamos a administrador de su propio comentario.
         return;
     }
     $id = $this->registry->lastCommentID;
     $Comment = new comment();
     $comment = $Comment->find($id);
     $comment['content'] = utils::nl2br($comment['content']);
     if (!defined('GESHI_VERSION')) {
         $comment['content'] = $this->comment_source_code_beautifier($comment['content'], 'addTagPRE');
     } else {
         $comment['content'] = $this->comment_source_code_beautifier($comment['content']);
     }
     $User = new user();
     $user = $User->find(1);
     $Post = new post();
     $post = $Post->find($comment['ID_post']);
     $commentsWaiting = $Comment->countCommentsByPost(null, 'waiting');
     $mailStr = "\n\t\t\t<table width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<small>\n\t\t\t\t\t\t<strong>From IP</strong>: {$comment['IP']}<br />\n\t\t\t\t\t\t<strong>URL</strong>: <a href=\"{$comment['url']}\">{$comment['url']}</a><br />\n\t\t\t\t\t\t<strong>Email</strong>: <a href=\"mailto:{$comment['email']}\">{$comment['email']}</a><br />\n\t\t\t\t\t\t<strong>DateTime</strong>: {$comment['created']}<br />\n\t\t\t\t\t</small>\n\t\t\t\t\t<hr>\n\t\t\t\t\t<strong>Author</strong>: {$comment['author']}<br />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr><td><strong>Content</strong></td></tr>\n\t\t\t<tr><td bgcolor=\"#f7f7f7\">\n\t\t\t\t{$comment['content']}\n\t\t\t\t<hr />\n\t\t\t</td></tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tModerate comment: <a href=\"{$this->registry->path}comments/edit/{$comment['ID']}\">{$this->registry->path}comments/edit/{$comment['ID']}</a><br />\n\t\t\t\t\t\tView entry: <a href=\"{$this->registry->path}{$post['urlfriendly']}\">{$this->registry->path}{$post['urlfriendly']}</a>\n\t\t\t\t\t</p>\n\t\t\n\t\t\t\t\t<p>\n\t\t\t\t\t\tThere are {$commentsWaiting} comments waiting for approbal. <br />\n\t\t\t\t\t\tPlease moderate comments: <a href=\"{$this->registry->path}comments/waiting\">{$this->registry->path}comments</a>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t</table>\n\t\t";
     $conf = $this->registry->conf;
     $subject = "[{$conf['blog_name']}] Nuevo Comentario en: {$post['title']}";
     $this->enviaMail($user['email'], $subject, $mailStr, $user['email']);
 }
开发者ID:ravenlp,项目名称:CodiceCMS,代码行数:25,代码来源:commentNotify.plugin.php


示例2: add

 public function add()
 {
     global $db;
     $recipient = new user();
     if ($recipient->get('name', $this->data['recipient']) == 'done') {
         $sender = new user();
         if ($sender->get('name', $this->data['sender']) == 'done') {
             if (!$sender->isBlocked($recipient->data['id'])) {
                 $this->data['id'] = misc::newId('messages');
                 $sent = strftime('%Y-%m-%d %H:%M:%S', time());
                 $db->query('insert into messages (id, sender, recipient, subject, body, sent, viewed) values ("' . $this->data['id'] . '", "' . $sender->data['id'] . '", "' . $recipient->data['id'] . '", "' . $this->data['subject'] . '", "' . $this->data['body'] . '", "' . $sent . '", "' . $this->data['viewed'] . '")');
                 if ($db->affected_rows() > -1) {
                     $status = 'done';
                 } else {
                     $status = 'error';
                 }
             } else {
                 $status = 'blocked';
             }
         } else {
             $status = 'noSender';
         }
     } else {
         $status = 'noRecipient';
     }
     return $status;
 }
开发者ID:yunsite,项目名称:devana-heroic,代码行数:27,代码来源:message.class.php


示例3: load_user

 private function load_user()
 {
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $user = new user();
     $uinfo = $user->verify_credentials();
     $this->user = $uinfo;
 }
开发者ID:h3len,项目名称:Project,代码行数:7,代码来源:session.php


示例4: openqrm_dhcpd_resource

function openqrm_dhcpd_resource($cmd, $resource_fields)
{
    global $event;
    global $OPENQRM_SERVER_BASE_DIR;
    global $OPENQRM_SERVER_IP_ADDRESS;
    global $OPENQRM_EXEC_PORT;
    $resource_id = $resource_fields["resource_id"];
    $resource_ip = $resource_fields["resource_ip"];
    $resource_mac = $resource_fields["resource_mac"];
    if (isset($resource_fields["resource_subnet"])) {
        $resource_subnet = $resource_fields["resource_subnet"];
    } else {
        $resource_subnet = "0.0.0.0";
    }
    $openqrm_admin_user = new user("openqrm");
    $openqrm_admin_user->set_user();
    $openqrm_server = new openqrm_server();
    $event->log("openqrm_new_resource", $_SERVER['REQUEST_TIME'], 5, "openqrm-dhcpd-resource-hook.php", "Handling {$cmd} event {$resource_id}/{$resource_ip}/{$resource_subnet}/{$resource_mac}", "", "", 0, 0, $resource_id);
    switch ($cmd) {
        case "add":
            $openqrm_server->send_command($OPENQRM_SERVER_BASE_DIR . "/openqrm/plugins/dhcpd/bin/openqrm-dhcpd-manager add -d " . $resource_id . " -m " . $resource_mac . " -i " . $resource_ip . " -s " . $resource_subnet . " -u " . $openqrm_admin_user->name . " -p " . $openqrm_admin_user->password . " --openqrm-cmd-mode background");
            break;
        case "remove":
            $openqrm_server->send_command("{$OPENQRM_SERVER_BASE_DIR}/openqrm/plugins/dhcpd/bin/openqrm-dhcpd-manager remove -d " . $resource_id . " -m " . $resource_mac . " -i " . $resource_ip . " -s " . $resource_subnet . " -u " . $openqrm_admin_user->name . " -p " . $openqrm_admin_user->password . " --openqrm-cmd-mode background");
            break;
    }
}
开发者ID:kelubo,项目名称:OpenQRM,代码行数:27,代码来源:openqrm-dhcpd-resource-hook.php


示例5: __construct

 /**
  * Layout Page Logic
  * @return 
  * @param $db Object
  */
 function __construct(database $db, user $user)
 {
     $this->db =& $db;
     $this->user =& $user;
     $this->sub_page = Kit::GetParam('sp', _GET, _WORD, 'view');
     $this->layoutid = Kit::GetParam('layoutid', _REQUEST, _INT);
     // If we have modify selected then we need to get some info
     if ($this->layoutid != '') {
         // get the permissions
         Debug::LogEntry('audit', 'Loading permissions for layoutid ' . $this->layoutid);
         $this->auth = $user->LayoutAuth($this->layoutid, true);
         if (!$this->auth->edit) {
             trigger_error(__("You do not have permissions to edit this layout"), E_USER_ERROR);
         }
         $this->sub_page = "edit";
         $sql = " SELECT layout, description, userid, retired, xml FROM layout ";
         $sql .= sprintf(" WHERE layoutID = %d ", $this->layoutid);
         if (!($results = $db->query($sql))) {
             trigger_error($db->error());
             trigger_error(__("Cannot retrieve the Information relating to this layout. The layout may be corrupt."), E_USER_ERROR);
         }
         if ($db->num_rows($results) == 0) {
             $this->has_permissions = false;
         }
         while ($aRow = $db->get_row($results)) {
             $this->layout = Kit::ValidateParam($aRow[0], _STRING);
             $this->description = Kit::ValidateParam($aRow[1], _STRING);
             $this->retired = Kit::ValidateParam($aRow[3], _INT);
             $this->xml = $aRow[4];
         }
     }
 }
开发者ID:rovak73,项目名称:xibo-cms,代码行数:37,代码来源:layout.class.php


示例6: test_customusersetthemectx

 /**
  * Test custom userset theme assignment.
  */
 public function test_customusersetthemectx()
 {
     $this->load_csv_data();
     // ELIS user with the associated moodle user.
     $user = new user(103);
     $muser = $user->get_moodleuser();
     // Userset with a custom theme.
     $userset = new userset(1);
     $userset->field__elis_userset_theme = 'formal_white';
     $userset->field__elis_userset_themepriority = 1;
     $userset->save();
     // Assign the user to the user set.
     $usersetassign = new clusterassignment();
     $usersetassign->userid = $user->id;
     $usersetassign->clusterid = $userset->id;
     $usersetassign->save();
     // Pretend to be that user.
     $this->setUser($muser->id);
     // Initialize page.
     $page = new moodle_page();
     $page->initialise_theme_and_output();
     // Assert we have our theme.
     $this->assertEquals('formal_white', $page->theme->name);
     $this->setUser(null);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:28,代码来源:customusersettheme_test.php


示例7: create_session

 public static function create_session($username, $password, $view)
 {
     $username = str_replace("['\"]", "", $username);
     $password = str_replace("['\"]", "", $password);
     $view = str_replace("['\"]", "", $view);
     $user = new user();
     $keys = array("username", "password");
     $values = array($username, md5($password));
     $user1 = $user->get_with_parameter($keys, $values);
     //error_log(var_export($user1));
     //error_log("view: $view");
     if ($user1 != null) {
         if ($view * 1 === 1 && $user1->has_group(session::GROUP_DASHBOARD) === true || $view * 1 === 2 && $user1->has_group(session::GROUP_METADATA) === true) {
             $session = new session();
             $session->session_id = uniqid();
             $session->user_id = $user1->id;
             $session->activ = 1;
             $d1 = new DateTime();
             $d1->add(new DateInterval("PT30S"));
             $session->duration_time = $d1->format("Y-m-d H:i:s");
             $session->insert();
             return $session;
         }
     }
     return NULL;
 }
开发者ID:hurricanetx,项目名称:holmes-bi,代码行数:26,代码来源:session.php


示例8: duelRankInfo

 public function duelRankInfo(user $user)
 {
     $points = $user->getDuelPoints();
     if ('0' == $points) {
         $level = 0;
     }
     if ('0' < $points && $points <= '1000') {
         $level = 1;
     }
     //incognito
     if ('1000' < $points && $points <= '2000') {
         $level = 2;
     }
     if ('2000' < $points && $points <= '3000') {
         $level = 3;
     }
     if ('3000' < $points) {
         $level = 4;
     }
     //now we are going to determine the place of the user.
     $repository = $this->em->getRepository('BFUserBundle:User');
     $globalRank = $repository->globalDuelRanking();
     $countryRank = $repository->countryDuelRanking($user->getCountry());
     $stateRank = $repository->stateDuelRanking($user->getState());
     $globalRank = array_search($user, $globalRank) + 1;
     $countryRank = array_search($user, $countryRank) + 1;
     $stateRank = array_search($user, $stateRank) + 1;
     //making an object to return all these informations
     $rankInfo = array('level' => $level);
     return $rankInfo;
 }
开发者ID:jojotjebaby,项目名称:Bestfootball,代码行数:31,代码来源:BFUserinfo.php


示例9: show

 public function show()
 {
     $user_id = $this->user['id'];
     include_once ROOT_PATH . 'lib/user/user.class.php';
     $info = new user();
     $user_info = $info->getUserById($user_id, "all");
     $user_info = $user_info[0];
     $id = $user_info['id'];
     $hot_station = $this->mVideo->get_station(0, 0, 0, 10);
     if (is_array($hot_station)) {
         unset($hot_station[count($hot_station) - 1]);
     }
     $hot_video = $this->mVideo->get_video_info(0, 0, 6, '', 2);
     $stationInfo = $this->mVideo->get_user_station();
     $this->page_title = $this->lang['pageTitle'];
     $this->settings['nav_menu'][3] = array("name" => "频道设置", "url" => SNS_VIDEO . SCRIPTNAME, "last" => 1);
     $gScriptName = SCRIPTNAME;
     hg_add_head_element('js-c', "\r\n\t\t\tvar re_back = 'my_station.php';\r\n\t\t\tvar re_back_login = 'login.php';\r\n\t\t");
     hg_add_head_element('js', RESOURCE_DIR . 'scripts/' . 'my.js');
     $this->tpl->addVar('head_line', $this->settings['nav_menu']);
     $this->tpl->addVar('id', $id);
     $this->tpl->addVar('user_id', $user_id);
     $this->tpl->addVar('user_info', $user_info);
     $this->tpl->addVar('hot_station', $hot_station);
     $this->tpl->addVar('hot_video', $hot_video);
     $this->tpl->addVar('stationInfo', $stationInfo);
     $this->tpl->addVar('gScriptName', $gScriptName);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->setTemplateTitle($this->page_title);
     $this->tpl->outTemplate('my_station');
 }
开发者ID:h3len,项目名称:Project,代码行数:31,代码来源:my_station.php


示例10: displayContent

 protected function displayContent()
 {
     // nl2br converts a new line character to an HTML break tag
     $html = '<p>' . nl2br($this->pageInfo['content']) . '</p>';
     if (!isset($_SESSION['userID'])) {
         return false;
     }
     //instantiate the form
     include 'classes/formsClass.php';
     $form = new form($this->model);
     //instantiate the class user
     include 'classes/userClass.php';
     $user = new user($this->model);
     //instantiate the class centre
     include 'classes/centreClass.php';
     $centre = new centre($this->model);
     $html .= $user->displayUserPage();
     if (!isset($_POST['submitRate'])) {
         $html .= '<div><br/><br/>';
         $html .= $centre->displayCentres();
         $html .= '</div>';
     } else {
         $result = $centre->addRate();
         if (!$result) {
             $html .= '<h4 class="redhead">You have successfully <br/>ranked the centre!</h4>';
             //count function
             //$html .= $centre -> displayNewRanking();
             //display the arrays in the
         } else {
             $html .= '<h4>Sorry, something went wrong please contact us <a href="index.php?page=contact">here</a></h4>';
         }
     }
     return $html;
 }
开发者ID:pamcez,项目名称:Project1PHP,代码行数:34,代码来源:userView.php


示例11: create_kvm_vm

function create_kvm_vm($host_resource_id, $name, $mac, $memory, $cpu, $swap, $additional_nic_str, $vm_type, $vncpassword)
{
    global $OPENQRM_SERVER_BASE_DIR;
    global $OPENQRM_SERVER_IP_ADDRESS;
    global $OPENQRM_EXEC_PORT;
    global $RESOURCE_INFO_TABLE;
    global $event;
    $event->log("create_kvm_vm_local", $_SERVER['REQUEST_TIME'], 5, "kvm-cloud-hook", "Creating KVM VM {$name} on Host resource {$host_resource_id}", "", "", 0, 0, 0);
    // start the vm on the host
    $host_resource = new resource();
    $host_resource->get_instance_by_id($host_resource_id);
    // we need to have an openQRM server object too since some of the
    // virtualization commands are sent from openQRM directly
    $openqrm = new openqrm_server();
    $openqrm_admin_user = new user("openqrm");
    $openqrm_admin_user->set_user();
    $vncpassword_parameter = "";
    if ($vncpassword != '') {
        $vncpassword_parameter = " -v " . $vncpassword;
    }
    // send command to create vm
    $vm_create_cmd = "{$OPENQRM_SERVER_BASE_DIR}/openqrm/plugins/kvm/bin/openqrm-kvm-vm create -n " . $name . " -y " . $vm_type . " -m " . $mac . " -r " . $memory . " -c " . $cpu . " -b local " . $additional_nic_str . " " . $vncpassword_parameter . " -u " . $openqrm_admin_user->name . " -p " . $openqrm_admin_user->password;
    $host_resource->send_command($host_resource->ip, $vm_create_cmd);
    $event->log("create_kvm_vm_local", $_SERVER['REQUEST_TIME'], 5, "kvm-cloud-hook", "Running {$vm_create_cmd}", "", "", 0, 0, 0);
}
开发者ID:kelubo,项目名称:OpenQRM,代码行数:25,代码来源:openqrm-kvm-cloud-hook.php


示例12: IMPORT_MEMBERS

function IMPORT_MEMBERS()
{
    $me = $_SERVER["SERVER_NAME"];
    $error = array();
    $members = unserialize(base64_decode($_POST["MEMBERS"]));
    writelogs("Analyze " . count($members) . " members for ou " . $_POST["OU"], __FUNCTION__, __FILE__, __LINE__);
    while (list($uid, $array) = each($members)) {
        writelogs("Analyze {$uid} for ou " . $_POST["OU"], __FUNCTION__, __FILE__, __LINE__);
        $user = new user($uid);
        if ($user->UserExists) {
            $user->password = $array["password"];
            if ($user->add_user()) {
                $success[] = "{$me}::IMPORT_MEMBERS:: Success updating {$uid} in LDAP database";
            } else {
                $error[] = "Failed updating {$uid} in LDAP database\n {$user->ldap_error}";
            }
            continue;
        }
        while (list($key, $value) = each($array)) {
            $user->{$key} = $value;
        }
        if ($user->add_user()) {
            $success[] = "{$me}::IMPORT_MEMBERS:: Success adding {$uid} in LDAP database";
        } else {
            $error[] = "Failed adding {$uid} in LDAP database\n {$user->ldap_error}";
        }
    }
    if (count($error) > 0) {
        echo "<ERROR>" . @implode("\n", $error) . "</ERROR>";
    }
    if (count($success) > 0) {
        echo "<SUCCESS>" . @implode("\n", $success) . "</SUCCESS>";
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:import.users.listener.php


示例13: login

 public function login()
 {
     $this->load->library('form_validation');
     $this->form_validation->set_rules('username', 'username', 'required|trim|min_length[3]');
     $this->form_validation->set_rules('password', 'password', 'required|trim|min_length[3]');
     if ($this->form_validation->run() == false) {
         $this->load->view('loginview');
     } else {
         $user = new user();
         $user->set_username($this->input->post('username'));
         $user->set_password($this->input->post('password'));
         $mannualauth = new user_mannual_auth($user);
         if ($return = $mannualauth->authenticate()) {
             switch ($return) {
                 case 'ACCOUNT_INVALID':
                     echo $return;
                     break;
                 case 'PASSWORD_INCORRECT':
                     echo $return;
                     break;
                 case 'USER_NOT_FOUND':
                     echo $return;
                     break;
                 default:
                     $mannualauth->role();
                     $this->session->set_userdata('user', serialize($user));
                     redirect('home/dashboard');
                     break;
             }
         } else {
             echo "Error:some problem occured in creation";
         }
     }
 }
开发者ID:shambhukumar,项目名称:Codeigniter_authentication,代码行数:34,代码来源:Logincontroller.php


示例14: loginAction

 public function loginAction()
 {
     $view = (include "../view/loginform.php");
     return $view;
     session_start();
     require_once '../model/loginModel.php';
     $formLogin = true;
     $error = array();
     $user = new user();
     if (empty($_POST)) {
         $result = $user->loginUser($pdo);
         if (isset($_POST['pseudo'])) {
             $error['pseudo'] = 'Veuillez indiquer votre pseudo';
             $formLogin = false;
         }
         if (!isset($_POST['password']) || strlen($_POST['password']) < 6) {
             $error['password'] = 'Saisissez un mot de passe de plus de 6 caracteres';
             $formLogin = false;
         }
         $_POST['password'] = trim(htmlentities(sha1($_POST['password'])));
         if ($result['password'] != $_POST['password']) {
             $error['passcheck'] = 'mot de passe est incorrect';
             $formLogin = false;
         }
         if ($formLogin) {
             http_response_code(400);
             echo json_encode(array('success' => false, "errors" => $errors));
         } else {
             $_SESSION['pseudo'] = $info['pseudo'];
             $_SESSION['id'] = $info['id'];
             $result = $login->loginUser($pdo);
             echo json_encode(array('success' => true, "user" => $_POST));
         }
     }
 }
开发者ID:LattyS,项目名称:my_blog,代码行数:35,代码来源:AuthController.php


示例15: process

 private function process()
 {
     $this->commonProcess();
     $config = services::getService('config');
     $lang = services::getService('lang');
     $params = services::getService('pageParams');
     $mail = services::getService('mail');
     $geo = services::getService('geoinfo');
     $categories = services::getService('cats');
     if ($params->getParam('add_to_adressbook')) {
         $addr = new adressbook();
         $addr->sender_id = $this->user->id;
         $addr->recipient_id = $params->getParam('showmember');
         if (!$addr->find()) {
             $addr->insert();
             $this->addMsg('msg_adressbook_add_success');
         } else {
             $this->addMsg('msg_adressbook_add_allready');
         }
     }
     // build userlist
     // assotiativ array with object and detail-flag
     $smember = new user();
     $smember->id = $params->getParam('showmember');
     $smember->find(true);
     $member = array("obj" => $smember);
     $this->member = $member;
     $this->member['obj']->getPhoto();
     $this->geodist = $geo->getDistance($this->user, $this->member["obj"]);
 }
开发者ID:BackupTheBerlios,项目名称:cosmopool-multi-svn,代码行数:30,代码来源:pageShowMember.php


示例16: getSectorLink

 public function getSectorLink($x, $y, &$i)
 {
     if (isset($this->data[$i]) && $this->data[$i]['x'] == $x && $this->data[$i]['y'] == $y) {
         if ($this->data[$i]['type'] != 2) {
             $output = 'href="javascript: fetch(\'getGrid.php\', \'x=' . $x . '&y=' . $y . '\')" onMouseOver="setSectorData(labels[' . $this->data[$i]['type'] . '], \'-\', \'-\')" onMouseOut="setSectorData(\'-\', \'-\', \'-\')"';
         } else {
             $node = new node();
             $node->get('id', $this->data[$i]['id']);
             $user = new user();
             $user->get('id', $node->data['user']);
             $alliancename = '-';
             if ($user->data['alliance']) {
                 $alliance = new alliance();
                 $alliance->get('user', $user->data['id']);
                 $alliancename = $alliance->data['name'];
             }
             $output = 'href="javascript: fetch(\'getGrid.php\', \'x=' . $x . '&y=' . $y . '\')" onMouseOver="setSectorData(\'' . $node->data['name'] . '\', \'' . $user->data['name'] . '\', \'' . $alliancename . '\')" onMouseOut="setSectorData(\'-\', \'-\', \'-\')"';
         }
         if ($i < count($this->data) - 1) {
             $i++;
         }
     } else {
         $output = 'href="javascript: fetch(\'getGrid.php\', \'x=' . $x . '&y=' . $y . '\')"';
     }
     return $output;
 }
开发者ID:yunsite,项目名称:devana-heroic,代码行数:26,代码来源:grid.class.php


示例17: popup

function popup()
{
    $users = new usersMenus();
    $ct = new user($_GET["uid"]);
    $tpl = new templates();
    $title = $ct->DisplayName;
    $GRPS = $ct->GetGroups($_GET["uid"], 1);
    while (list($num, $GroupName) = each($ct->GroupsOf)) {
        $jsGRP = "Loadjs('domains.edit.group.php?js=yes&group-id={$num}',true)";
        $XTRG[] = "<tr>\n\t\t\t\t\t<td style='width:16px'><img src='img/wingroup.png'></td>\n\t\t\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\" style='text-decoration:underline'>{$GroupName}</a></td>\n\t\t\t\t</tr>";
    }
    $editjs = MEMBER_JS($_GET["uid"], 1, 1);
    $bouton = button("{edit_member}", $editjs, 18, 185);
    if ($users->cyrus_imapd_installed) {
        include_once dirname(__FILE__) . "/ressources/class.cyrus.inc";
        $cyr = new cyrus();
        $RealMailBox = $cyr->IfMailBoxExists($_GET["uid"]);
        $button2 = "<div style='margin-top:10px'>" . button("{mailbox}", "Loadjs('domain.edit.user.cyrus-mailbox.php?js=yes&uid={$_GET["uid"]}')", 18, 185) . "</div>";
        if (!$RealMailBox) {
            if (preg_match("#Authentication failed#i", $cyr->cyrus_infos)) {
                $error = "<p class=text-error>{authentication_failed_cyrus}</p>";
            } else {
                $error = "<p class=text-error>{user_no_mailbox} !!</p>";
                $button2 = "<div style='margin-top:10px'>" . button("{create_mailbox2}", "Loadjs('domains.edit.user.php?create-mailbox-wizard=yes&uid={$_GET["uid"]}&MailBoxMaxSize=0')", 18, 185) . "</div>";
            }
        }
    }
    $picture_link = "img/impersonate-photo.png";
    $html = "\n\t{$error}\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:190px;vertical-align:top'>\n\t\t<center style='margin-top:15px'>\n\t\t<img style='border-radius: 50% 50% 50% 50%;\n    \t\tbox-shadow: 0 0 5px silver;height: 180px;margin: 0 32px;width: 180px;' src='{$picture_link}'></a>\n    <center style='font-size: 24px;line-height: 1.2;word-wrap: break-word;margin-top:30px;margin-bottom:30px'>\n    {$title}</center>\n\n    {$bouton}{$button2}\n    </center>\t\n\t</td>\n\t\t<td style='width:80%;vertical-aglin:top'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend><div>{Contact_Information}:</div>\n\t\t\t\t<i style='font-size:16px'>{$description}</i></td>\n\t\t\t</tr>\n\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{member}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->givenName} {$ct->sn}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{account}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->uid}</strong></td>\n\t\t\t</tr>\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{email}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->mail}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{telephoneNumber}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->telephoneNumber}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{mobile}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->mobile}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend>" . count($GRPS) . " {groups}:</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td><table style='width:100%'>" . @implode("", $XTRG) . "</table></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<p>&nbsp;</p>\n\t</div>\n\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:system.member.ldap.php


示例18: SaveInfos

function SaveInfos()
{
    $ct = new user($_GET["uid"]);
    $ct->EnableBackupAccount = $_GET["EnableBackupAccount"];
    $ct->RsyncBackupTargetPath = $_GET["RsyncBackupTargetPath"];
    $ct->save_EnableBackupAccount();
}
开发者ID:brucewu16899,项目名称:artica,代码行数:7,代码来源:domains.edit.user.backup.php


示例19: test_coursepermissions

 /**
  * Test for correct assignment of course permissions
  */
 public function test_coursepermissions()
 {
     global $DB, $CFG, $USER;
     accesslib_clear_all_caches(true);
     set_config('siteguest', '');
     set_config('siteadmins', '');
     $this->assertFalse($this->has_program_create_capability());
     $this->assertFalse($this->has_associate_and_manage_capability());
     $this->assertFalse($this->has_program_view_capability());
     $syscontext = context_system::instance();
     $assigninguser = new user(array('idnumber' => 'testuserid', 'username' => 'testuser', 'firstname' => 'testuser', 'lastname' => 'testuser', 'email' => '[email protected]', 'country' => 'CA'));
     $assigninguser->save();
     $roleid = create_role('userrole', 'userrole', 'userrole');
     $usr = $DB->get_record('user', array('username' => 'testuser'));
     $this->setUser($usr);
     $USER = $usr;
     assign_capability('local/elisprogram:associate', CAP_ALLOW, $roleid, $syscontext->id);
     assign_capability('local/elisprogram:manage', CAP_ALLOW, $roleid, $syscontext->id);
     assign_capability('local/elisprogram:program_create', CAP_ALLOW, $roleid, $syscontext->id);
     assign_capability('local/elisprogram:program_enrol', CAP_ALLOW, $roleid, $syscontext->id);
     assign_capability('local/elisprogram:program_view', CAP_ALLOW, $roleid, $syscontext->id);
     role_assign($roleid, $usr->id, $syscontext->id);
     $this->assertTrue($this->has_program_create_capability());
     $this->assertTrue($this->has_associate_and_manage_capability());
     $this->assertTrue($this->has_program_view_capability());
     $this->setUser(null);
 }
开发者ID:jamesmcq,项目名称:elis,代码行数:30,代码来源:permissions_test.php


示例20: reconcileAllPaymentUids

 static function reconcileAllPaymentUids()
 {
     $txn = new paypal_transaction();
     $extraWhere = "bp_biobounce_uid ='0'";
     while ($txn->loadNext($extraWhere)) {
         $found = false;
         $email = $txn->get_variable('bp_paypal_email');
         $paypalid = $txn->get_variable('bp_paypal_payer_id');
         $txnFind = new paypal_transaction();
         $extraWhere2 = "bp_biobounce_uid<>'0' AND bp_paypal_payer_id='" . $paypalid . "'";
         if ($txnFind->load($extraWhere2)) {
             $bioId = $txnFind->get_variable('bp_biobounce_uid');
             $found = true;
             //echo "\n\nFOUND THE USER ID BASED ON PREVIOUSLY BEING SET:PAYPALID=" . $paypalid;
         } else {
             $usr = new user();
             $usr->set_variable('users_email', $email);
             if ($usr->load()) {
                 $bioId = $usr->get_variable('users_id');
                 $found = true;
                 //echo "\nFOUND THE USER ID BASED ON SAME EMAIL ADDRESS:ADDRESS=" . $email;
             }
         }
         if ($found) {
             $txnId = $txn->get_variable('bp_id');
             //echo "\nUPDATING TRANSACTION NUMBER=" . $txnId . " to use UID=" . $bioId;
             $txn->set_variable('bp_biobounce_uid', $bioId);
             $txn->update();
         }
     }
 }
开发者ID:patfeldman,项目名称:TechBounce,代码行数:31,代码来源:payment_info.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP user_picture类代码示例发布时间:2022-05-23
下一篇:
PHP url_select类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap