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


PHP getUserDetails函数代码示例

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


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

示例1: index

 /**
  * Function to edit the notification page of a user email
  * @param
  * @author : Anup
  * @return
  */
 public function index()
 {
     $this->load->helper('pinterest_helper');
     //get reference and reference id
     $referenceId = $this->session->userdata('referenceId');
     $reference = $this->session->userdata('reference');
     //get current email
     $neededValue = 'email';
     $data['email'] = getUserDetails($referenceId, $reference, $neededValue);
     //get current email settings
     $this->load->model('editprofile_model');
     $row = $this->editprofile_model->emailSettingDetails($data['email']);
     if (!empty($row)) {
         //assign checked or not checked
         foreach ($row as $key => $value) {
             if ($key != 'frequency' && $key != 'email') {
                 $data[$key] = $value == 'on' ? 'checked=checked' : '';
             }
             if ($key == 'frequency') {
                 if ($value == 1) {
                     $data['frequency_1'] = 'checked=checked';
                     $data['frequency_2'] = '';
                 } elseif ($value == 2) {
                     $data['frequency_1'] = '';
                     $data['frequency_2'] = 'checked=checked';
                 }
             }
         }
     } else {
         $data['all'] = $data['group_pins'] = $data['comments'] = $data['likes'] = $data['repins'] = $data['follows'] = $data['frequency_1'] = $data['frequency_2'] = $data['digest'] = $data['news'] = '';
     }
     $this->load->view('notifications_view', $data);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:39,代码来源:notifications.php

示例2: recruitSoldier

function recruitSoldier($id) {
	$com = getUserDetails($id, "commander");
	updateUser($id, " exp =exp+6,clicks=clicks+4");
	if ($com->commander AND $com->commander == $_SESSION['isLogined']) {
		updateUser($com->commander, " exp =exp+3,clicks=clicks+1,uu=uu+1");
	}
}
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:7,代码来源:recruit.php

示例3: deleteUser

function deleteUser($id)
{
    $details = getUserDetails($id);
    if ($details) {
        $requete = 'UPDATE membre 
					 SET niveau = 10, pseudo = "Utilisateur Supprimé", mdp = "Bien essayé", civilite = NULL, nom = NULL, prenom = NULL, ddn = NULL, mail = "Bien essayé", tel = NULL, description = NULL, id_photo = NULL, id_adresse = NULL, date_derniere_connexion = NULL
					 WHERE id = :id;';
        $execution = [':id' => $id];
        $removeAddress = 'DELETE FROM adresse
					  	  WHERE id = :id_adresse;';
        $removeMedia = 'DELETE FROM media
						  WHERE id = :id_photo;';
        if ($details["id_adresse"]) {
            $requete .= $removeAddress;
            $execution = array_merge([':id_adresse' => $details['id_adresse']], $execution);
        }
        if ($details["id_photo"]) {
            $requete .= $removeMedia;
            unlink(PHOTO_PROFIL . $details['lien_photo']);
            $execution = array_merge([':id_photo' => $details['id_photo']], $execution);
        }
        $bdd = new PDO(DSN, DBUSER, DBPASS);
        $query = $bdd->prepare($requete);
        if ($query->execute($execution)) {
            return True;
        } else {
            var_dump($query->errorInfo());
            return False;
        }
    } else {
        return False;
    }
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:33,代码来源:deleteUser.php

示例4: index

 /**
  * Function to change user password
  * @param
  * @author : Vishal
  * @since  : 20-03-2012
  * @return
  */
 public function index()
 {
     $this->sitelogin->entryCheck();
     $this->load->helper('pinterest_helper');
     $data['title'] = 'Change password';
     $data['message'] = $message = '';
     $data['olderror'] = $olderror = '';
     /*get reference id and reference field*/
     $referenceId = $this->session->userdata('referenceId');
     $reference = $this->session->userdata('reference');
     //get current password
     $neededValue = 'password';
     if ($referenceId) {
         $data['password'] = $password = getUserDetails($referenceId, $reference, $neededValue);
     } else {
         redirect();
     }
     //if new passwords submit
     if ($_POST) {
         $old = $this->input->post('old_password');
         $new1 = $this->input->post('new_password1');
         $new2 = $this->input->post('new_password2');
         //check for the old passwords matching
         if (md5($old) != $password) {
             $data['olderror'] = $olderror .= 'seems to be a wrong value';
         } else {
             //if correct update the db table
             $this->load->model('editprofile_model');
             $this->editprofile_model->changePassword(md5($new1), md5($old), $reference, $referenceId);
             $data['message'] = 'saved successfully';
         }
     }
     //$this->load->view('header',$data);
     $this->load->view('changepassword_view', $data);
 }
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:42,代码来源:password.php

示例5: get_user_details

 public function get_user_details()
 {
     $user_details = getUserDetails(1);
     $data['user_details'] = $user_details;
     $this->load->view('get_user_details', $data);
     $this->load->view('footer');
 }
开发者ID:ucantseeme,项目名称:p2,代码行数:7,代码来源:Welcome.php

示例6: login

 function login($un = "", $pw = "", $remember = false)
 {
     if ($un != "" && $pw != "") {
         $session_token = login($un, $pw);
         if ($session_token) {
             $this->token = $session_token['session'];
             $this->userid = $session_token['uid'];
             $details = getUserDetails($this->userid);
             $this->username = $details['email'];
             $this->type = $details['administrator'];
             $this->first_name = $details['firstname'];
             $this->last_name = $details['lastname'];
             $now = time();
             $timeout = 60 * 60 * 24 * 14;
             $to = $now + $timeout;
             if ($remember) {
                 setcookie('isense_login', $this->token, $to, "/");
             } else {
                 setcookie('isense_login', $this->token, 0, "/");
             }
             return true;
         }
     }
     return false;
 }
开发者ID:nickavv,项目名称:iSENSE,代码行数:25,代码来源:session.php

示例7: userstatus

function userstatus()
{
    global $helper;
    $loggedin = isLoggedIn();
    $user = getUserDetails();
    $helper->set('user', $user);
    return $helper->render();
}
开发者ID:Luisfmarkes,项目名称:socialturn,代码行数:8,代码来源:helpers.php

示例8: Login

function Login($user, $pass)
{
    $details = getUserDetails($user);
    if (!is_array($details)) {
        return false;
    }
    if ($details['pass'] == $pass) {
        $_SESSION['logged'] = true;
        $_SESSION['details'] = $details;
        //echo 'logged ;)';
        return true;
    }
    return false;
}
开发者ID:SashiAsakura,项目名称:AWS_QuikID_website,代码行数:14,代码来源:session.php

示例9: getComments

function getComments($id)
{
    require MODELES . 'membres/getUserDetails.php';
    $bdd = new PDO(DSN, DBUSER, DBPASS);
    $query = $bdd->prepare('SELECT id,contenu, id_auteur, DAY(date_modification) AS jour, MONTH(date_modification) AS mois, YEAR(date_modification) AS annee, HOUR(date_modification) AS heure, MINUTE(date_modification) AS minute, SECOND(date_modification) AS seconde FROM message WHERE message.id_topic = :id;');
    $query->execute(['id' => $id]);
    $comments = $query->fetchAll(PDO::FETCH_ASSOC);
    foreach ($comments as $key => $value) {
        $extraInfo = getUserDetails($comments[$key]['id_auteur']);
        $comments[$key]['pseudo'] = $extraInfo['pseudo'];
        $comments[$key]['lien'] = $extraInfo['lien_photo'];
    }
    return $comments;
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:14,代码来源:insertMessage.php

示例10: updateFollowStatus

function updateFollowStatus($conn, $appid, $secret)
{
    $startDate = trim($_GET["startDate"]);
    $endDate = trim($_GET["endDate"]);
    $query = "set names utf8";
    $result = $conn->query($query);
    $query = "SELECT openId FROM `T_scan_information` where createdDt > '{$startDate}' and createdDt < '{$endDate}'";
    $result = $conn->query($query);
    while ($row = $result->fetch_assoc()) {
        $openid = $row["openId"];
        $json_obj = getUserDetails($openid, $appid, $secret);
        $followed = $json_obj["subscribe"];
        $query = "update `T_scan_information` set followed = '{$followed}' where openId = '{$openid}'";
        $conn->query($query);
    }
}
开发者ID:AnderLX,项目名称:wechat,代码行数:16,代码来源:supporting.php

示例11: login

function login()
{
    include "user.php";
    $obj = new User();
    $uname = $_REQUEST['uname'];
    $pword = $_REQUEST['pword'];
    if (!$obj->getUser($uname, $pword)) {
        echo '{"result":0,"message": "failed to access user information"}';
    } else {
        $row = $obj->fetch();
        $_SESSION['userid'] = $row['id'];
        $_SESSION['username'] = $row['username'];
        $_SESSION['password'] = $row['password'];
        $_SESSION['permission'] = $row['permission'];
        getUserDetails();
    }
}
开发者ID:samsali,项目名称:SE-GROUP13,代码行数:17,代码来源:task_controller.php

示例12: slcPage

    /**
     * Responsible for rendering the start page when you login with a SLC account
     * @param  Integer $id Id of the SLC
     * @return Template of the SLC
     */
    public function slcPage($id)
    {
        $result = getUserDetails($id);
        // Gets the courses
        $statement = $this->db->prepare('SELECT cursus_Id, cursus_Name, cursus_Code, user_Name
			FROM Cursus as C, User as U
			WHERE C.User_user_Id = U.user_Id
			AND C.actief = :actief');
        $statement->bindValue('actief', 1);
        $statement->execute();
        $courses = $statement->fetchAll(\PDO::FETCH_ASSOC);
        // Gets all the students
        $statement = $this->db->prepare('SELECT * FROM User');
        $statement->execute();
        $students = $statement->fetchAll(\PDO::FETCH_ASSOC);
        if (isLogged($id) && $result['Rol_rol_Id'] == 3) {
            echo $this->twigRenderer->renderTemplate('slc.twig', array('id' => $id, 'courses' => $courses, 'students' => $students));
        } else {
            echo $this->twigRenderer->renderTemplate('noaccess.twig');
        }
    }
开发者ID:jkaan,项目名称:Time-Registration,代码行数:26,代码来源:SLCPartManager.php

示例13: monProfil

function monProfil()
{
    // ToDo : ajouter les options de modification
    // Attention : lors de la modification il faut vérifier les droits de l'utilisateur ! (car pas de vérif de privilèges dans cette page)
    // Rq: Il faut faire de même pour les messages privés (ou alors membres -> messages ne peut pointer QUE sur MES messages)
    // Pour les événents : si c'est mon profil on affiche tout, si c'est celui de qqun d'autre on affiche seulement les events publics, et les events privés auxquels je participe aussi.
    global $title;
    global $styles;
    global $blocks;
    global $contents;
    // On affichera les onglets :
    $styles = ['onglets_compte.css'];
    $blocks = ['onglets_compte'];
    $contents['ongletActif'] = 'profil';
    $contents['monProfil'] = True;
    $title = 'Mon profil';
    $details = getUserDetails($_SESSION['id']);
    /*    echo '<pre>';
        var_dump($details);
        echo '</pre>';*/
    loadContents($details);
    return True;
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:23,代码来源:profil.php

示例14: dirname

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "plugins.php";
if ($p_ < 2) {
    exit;
}
$id = $_GET['id'];
$sql = getUserDetails($id);
if ($guestsMode && $id >= 10000000) {
    $sql = getGuestDetails($id);
}
$query = mysql_query($sql);
if (defined('DEV_MODE') && DEV_MODE == '1') {
    echo mysql_error();
}
$user = mysql_fetch_array($query);
if (function_exists('processName')) {
    $user['username'] = processName($user['username']);
}
$log = '';
$filename = 'Conversation with ' . $user['username'] . ' on ' . date('M jS Y');
$messages = array();
getChatboxData($id);
开发者ID:phonglanpls,项目名称:jz-proj-2012,代码行数:31,代码来源:index.php

示例15: array

require_once '../phpInclude/dbconn.php';
require_once '../phpInclude/AdminClass.php';
$token = $_REQUEST['token'] ? $_REQUEST['token'] : '';
$others_id = $_REQUEST['others_id'] ? $_REQUEST['others_id'] : '';
$paging_enabled = $_REQUEST['paging_enabled'] ? $_REQUEST['paging_enabled'] : 0;
$pageno = (int) (!isset($_REQUEST['pageno']) ? 1 : $_REQUEST['pageno']);
$row_count = 10;
$offset = $pageno * $row_count - $row_count;
$users_details = array();
$all_posts = array();
$is_following = array();
if (!empty($token) && empty($others_id)) {
    $users_id = getUsersId($token);
    if (!empty($users_id)) {
        $result = getUserDetails($users_id);
        if ($paging_enabled) {
            $result1 = getAllPostsByUserwthpaging($users_id, $offset, $row_count);
        } else {
            $result1 = getAllPostsByUserwthoutpaging($users_id);
        }
        if (!empty($result)) {
            $success = "1";
            $msg = "This is Users Profile";
            $users_details = $result;
            if (!empty($result1)) {
                $all_posts = $result1;
            }
        } else {
            $success = "0";
            $msg = "Nothing to show";
开发者ID:Gameonn,项目名称:curler-class,代码行数:30,代码来源:view_profile.php


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