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


PHP qa_get_logged_in_user_field函数代码示例

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


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

示例1: logged_in

 function logged_in()
 {
     if (qa_is_logged_in()) {
         // output user avatar to login bar
         $this->output('<div class="qa-logged-in-avatar">', QA_FINAL_EXTERNAL_USERS ? qa_get_external_avatar_html(qa_get_logged_in_userid(), 24, true) : qa_get_user_avatar_html(qa_get_logged_in_flags(), qa_get_logged_in_email(), qa_get_logged_in_handle(), qa_get_logged_in_user_field('avatarblobid'), qa_get_logged_in_user_field('avatarwidth'), qa_get_logged_in_user_field('avatarheight'), 24, true), '</div>');
     }
     qa_html_theme_base::logged_in();
     if (qa_is_logged_in()) {
         // adds points count after logged in username
         $userpoints = qa_get_logged_in_points();
         $pointshtml = $userpoints == 1 ? qa_lang_html_sub('main/1_point', '1', '1') : qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));
         $this->output('<span class="qa-logged-in-points">', '(' . $pointshtml . ')', '</span>');
     }
 }
开发者ID:gogupe,项目名称:question2answer-releases,代码行数:14,代码来源:qa-theme.php

示例2: qa_calc_form_security_hash

function qa_calc_form_security_hash($action, $timestamp)
{
    if (qa_to_override(__FUNCTION__)) {
        $args = func_get_args();
        return qa_call_override(__FUNCTION__, $args);
    }
    $salt = qa_opt('form_security_salt');
    if (qa_is_logged_in()) {
        return sha1($salt . '/' . $action . '/' . $timestamp . '/' . qa_get_logged_in_userid() . '/' . qa_get_logged_in_user_field('passsalt'));
    } else {
        return sha1($salt . '/' . $action . '/' . $timestamp . '/' . @$_COOKIE['qa_key']);
    }
    // lower security for non logged in users - code+cookie can be transferred
}
开发者ID:kosmoluna,项目名称:question2answer,代码行数:14,代码来源:users.php

示例3: qw_notify_emails_selectspec

 function qw_notify_emails_selectspec($userid, $tags, $categoryid)
 {
     if (file_exists(QW_CONTROL_DIR . '/addons/notification/functions.php')) {
         require_once QW_CONTROL_DIR . '/addons/notification/functions.php';
         if (notify_addon_enabled_from_admin_panel()) {
             //proceed only if the plugin is enabled
             require_once QA_INCLUDE_DIR . 'qa-app-updates.php';
             $source = '';
             $arguments = array();
             if (!!qa_opt('qw_notify_user_followers')) {
                 $source .= !!$source ? ' UNION ' : '';
                 $source .= "( SELECT ^users.userid , 'q_post_user_fl' as event , ^userpoints.points from ^users JOIN ^userpoints ON ^users.userid=^userpoints.userid JOIN ^userfavorites ON ^users.userid=^userfavorites.userid WHERE ^userfavorites.entityid=\$ AND ^userfavorites.entitytype=\$  AND ^users.email !=\$ )";
                 $args = array($userid, QA_ENTITY_USER, qa_get_logged_in_user_field('email'));
                 $arguments = array_merge($arguments, $args);
             }
             if (!!qa_opt('qw_notify_tag_followers') && !!$tags) {
                 $source .= !!$source ? ' UNION ' : '';
                 $source .= "( SELECT ^users.userid , 'q_post_tag_fl' as event , ^userpoints.points from ^users JOIN ^userpoints ON ^users.userid=^userpoints.userid JOIN ^userfavorites ON ^userfavorites.userid=^users.userid WHERE ^userfavorites.entityid IN \n\t\t                            ( SELECT wordid from ^words where ^words.word IN (\$) ) AND ^userfavorites.entitytype=\$ AND ^users.email !=\$ )";
                 $args = array(qa_tagstring_to_tags($tags), QA_ENTITY_TAG, qa_get_logged_in_user_field('email'));
                 $arguments = array_merge($arguments, $args);
             }
             if (!!qa_opt('qw_notify_cat_followers') && !!$categoryid) {
                 $source .= !!$source ? ' UNION ' : '';
                 $source .= "( SELECT ^users.userid , 'q_post_cat_fl' as event , ^userpoints.points from ^users JOIN ^userpoints ON ^users.userid=^userpoints.userid JOIN ^userfavorites ON ^userfavorites.userid=^users.userid " . " WHERE ^userfavorites.entityid=\$ AND ^userfavorites.entitytype=\$ AND ^users.email !=\$ )";
                 $args = array($categoryid, QA_ENTITY_CATEGORY, qa_get_logged_in_user_field('email'));
                 $arguments = array_merge($arguments, $args);
             }
             $where_clause = '';
             if (!!qa_opt('qw_notify_min_points_opt')) {
                 //generate where clause
                 $min_user_points = qa_opt('qw_notify_min_points_val');
                 $where_clause = !!$min_user_points && $min_user_points > 0 ? ' WHERE result.points > ' . $min_user_points : '';
             }
             return array('columns' => array(' * '), 'source' => ' ( ' . $source . ' ) as result ' . $where_clause, 'arguments' => $arguments, 'sortasc' => 'title');
         }
         //if plugin is enabled
     }
 }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:38,代码来源:cs-user-events.php

示例4: qa_lang_sub

                } else {
                    $errors['avatar_default_show'] = qa_lang_sub('main/image_not_read', implode(', ', qa_gd_image_formats()));
                }
            }
        }
    }
}
//	Mailings management
if ($adminsection == 'mailing') {
    if (qa_clicked('domailingtest') || qa_clicked('domailingstart') || qa_clicked('domailingresume') || qa_clicked('domailingcancel')) {
        if (!qa_check_form_security_code('admin/' . $adminsection, qa_post_text('code'))) {
            $securityexpired = true;
        } else {
            if (qa_clicked('domailingtest')) {
                $email = qa_get_logged_in_email();
                if (qa_mailing_send_one(qa_get_logged_in_userid(), qa_get_logged_in_handle(), $email, qa_get_logged_in_user_field('emailcode'))) {
                    $formokhtml = qa_lang_html_sub('admin/test_sent_to_x', qa_html($email));
                } else {
                    $formokhtml = qa_lang_html('main/general_error');
                }
            }
            if (qa_clicked('domailingstart')) {
                qa_mailing_start();
                $startmailing = true;
            }
            if (qa_clicked('domailingresume')) {
                $startmailing = true;
            }
            if (qa_clicked('domailingcancel')) {
                qa_mailing_stop();
            }
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:31,代码来源:qa-page-admin-default.php

示例5: qam_user_account

 /**
  * User account navigation item. This will return based on login information.
  * If user is logged in, it will populate user avatar and account links.
  * If user is guest, it will populate login form and registration link.
  *
  * @since Snow 1.4
  */
 private function qam_user_account()
 {
     if (qa_is_logged_in()) {
         // get logged-in user avatar
         $handle = qa_get_logged_in_user_field('handle');
         $toggleClass = 'qam-logged-in';
         if (QA_FINAL_EXTERNAL_USERS) {
             $tobar_avatar = qa_get_external_avatar_html(qa_get_logged_in_user_field('userid'), $this->nav_bar_avatar_size, true);
         } else {
             $tobar_avatar = qa_get_user_avatar_html(qa_get_logged_in_user_field('flags'), qa_get_logged_in_user_field('email'), $handle, qa_get_logged_in_user_field('avatarblobid'), qa_get_logged_in_user_field('avatarwidth'), qa_get_logged_in_user_field('avatarheight'), $this->nav_bar_avatar_size, false);
         }
         $auth_icon = strip_tags($tobar_avatar, '<img>');
     } else {
         // display login icon and label
         $handle = $this->content['navigation']['user']['login']['label'];
         $toggleClass = 'qam-logged-out';
         $auth_icon = '<i class="icon-key qam-auth-key"></i>';
     }
     // finally output avatar with div tag
     $this->output('<div id="qam-account-toggle" class="' . $toggleClass . '">', $auth_icon, '<div class="qam-account-handle">' . qa_html($handle) . '</div>', '</div>');
 }
开发者ID:ronkeizer,项目名称:question2answer,代码行数:28,代码来源:qa-theme.php

示例6: qa_get_logged_in_flags

function qa_get_logged_in_flags()
{
    if (QA_FINAL_EXTERNAL_USERS) {
        return qa_get_logged_in_user_field('blocked') ? QA_USER_FLAGS_USER_BLOCKED : 0;
    } else {
        return qa_get_logged_in_user_field('flags');
    }
}
开发者ID:ramo01,项目名称:1kapp,代码行数:8,代码来源:qa-app-users.php

示例7: ra_user_avatar

 function ra_user_avatar()
 {
     if (qw_hook_exist(__FUNCTION__)) {
         $args = func_get_args();
         array_unshift($args, $this);
         return qw_event_hook(__FUNCTION__, $args, NULL);
     }
     if (qa_is_logged_in()) {
         // output user avatar to login bar
         $img_html = QA_FINAL_EXTERNAL_USERS ? qa_get_external_avatar_html(qa_get_logged_in_userid(), 24, true) : qa_get_user_avatar_html(qa_get_logged_in_flags(), qa_get_logged_in_email(), qa_get_logged_in_handle(), qa_get_logged_in_user_field('avatarblobid'), qa_get_logged_in_user_field('avatarwidth'), qa_get_logged_in_user_field('avatarheight'), 24, true);
         preg_match('@src="([^"]+)"@', $img_html, $match);
         $this->output($match[1]);
     }
 }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:14,代码来源:blocks.php

示例8: site_top

 function site_top()
 {
     $this->output('<div id="site-top" class="container">');
     $this->page_title_error();
     if (qa_is_logged_in()) {
         // output user avatar to login bar
         $this->output('<div class="qa-logged-in-avatar">', QA_FINAL_EXTERNAL_USERS ? qa_get_external_avatar_html(qa_get_logged_in_userid(), 24, true) : qa_get_user_avatar_html(qa_get_logged_in_flags(), qa_get_logged_in_email(), qa_get_logged_in_handle(), qa_get_logged_in_user_field('avatarblobid'), qa_get_logged_in_user_field('avatarwidth'), qa_get_logged_in_user_field('avatarheight'), 24, true), '</div>');
     } else {
         $this->output('<ul class="pull-right top-buttons clearfix">', '<li><a href="#" class="btn">' . qa_lang_html('cleanstrap/login') . '</a></li>', '<li><a href="#" class="btn">' . qa_lang_html('cleanstrap/register') . '</a></li>', '</ul>');
     }
     $this->output('</div>');
 }
开发者ID:microbye,项目名称:CleanStrap,代码行数:12,代码来源:blocks.php

示例9: qa_get_logged_in_flags

function qa_get_logged_in_flags()
{
    return QA_FINAL_EXTERNAL_USERS ? 0 : qa_get_logged_in_user_field('flags');
}
开发者ID:TheProjecter,项目名称:microprobe,代码行数:4,代码来源:qa-app-users.php


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