Author: chenxue4076
Drupal获取当前用户信息,密码验证,用户整合
- by chenxue4076
- 11 years ago
Drupal获取当前用户信息,密码验证,用户整合
查看全文Joomla获取当前登录用户信息,密码验证
- by chenxue4076
- 11 years ago
Joomla获取当前登录用户信息使用函数: $user = JFactory::getUser(); if ($user->id){ $username = $user->username; $password = $user=>password; } Joomla查询数据库: $db = JFactory::getDBO(); $query = “SELECT u.*,g.* FROM ( #__users u INNER JOIN #__user_usergroup_map g ON u.id = g.user_id ) WHERE username = ‘” . $username . “‘;”; $db->setQuery($query); if ($row = $db->loadAssoc()){ //有记录 $email = $row[’email’]; $username = $row[‘username’]; //密码验证 if(JUserHelper::verifyPassword($password, $row[‘password’], $row[‘id’])){ //密码正确 }else{ //密码不正确 } }else{ //没有记录 } 上面代码中验证密码是否正确的时候可能有的时候会出现问题,可以参考 Joomla加密方式密码验证详解 下面是验证密码的具体情况: $is_pwd_right = 0; if($password == $row[‘password’]){ $is_pwd_right = 1; }elseif(strlen($row[‘password’]) == 65){ list($hash, $salt) = explode(‘:’, $row[‘password’]); if(md5($password.$salt) == $hash){ $is_pwd_right = 1; } }elseif(strlen($row[‘password’]) == 60){ if(password_verify($password, $row[‘password’])){ $is_pwd_right = 1; } }else{ $is_pwd_right = JUserHelper::verifyPassword($password, $row[‘password’], $row[‘id’]); } if($is_pwd_right){ //密码正确 }else{ //密码错误 } (989)
查看全文WordPress 获取当前登录用户信息,密码验证方式,数据库查询
- by chenxue4076
- 11 years ago
wordpress 获取用户信息, 以及密码验证机制分析,数据库查询
查看全文CCBILL develop 开发信息配置
- by chenxue4076
- 11 years ago
CCBILL form post info and postback info admin panel configration
查看全文解决The environment variable JAVA_HOME does not point to a valid JVM installationSolution of The environment variable JAVA_HOME does not point to a valid JVM installation
- by chenxue4076
- 11 years ago
解决 The environment variable JAVA_HOME (with the values of D:\Program Files\Java\jdk1.8.0_05;) does not point to a valid JVM installation.问题Solution for The environment variable JAVA_HOME (with the values of D:\Program Files\Java\jdk1.8.0_05;) does not point to a valid JVM installation.
查看全文