projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved db_pager query parsing (fixed error in Sales Quotation Inquiry)
[fa-stable.git]
/
includes
/
current_user.inc
diff --git
a/includes/current_user.inc
b/includes/current_user.inc
index 90a91a9c079b68e45344f3ed0609b87c9eddf2a8..7d80febbe3b4f02f8f1acb00a5bd1a8d6f3d1903 100644
(file)
--- a/
includes/current_user.inc
+++ b/
includes/current_user.inc
@@
-22,6
+22,7
@@
class current_user
var $loginname;
var $username;
var $name;
var $loginname;
var $username;
var $name;
+ var $email;
var $company; // user's company
var $pos;
var $access;
var $company; // user's company
var $pos;
var $access;
@@
-58,7
+59,7
@@
class current_user
function login($company, $loginname, $password)
{
function login($company, $loginname, $password)
{
- global $security_areas, $security_groups, $security_headings, $path_to_root, $dflt_lang;
+ global $security_areas, $security_groups, $security_headings, $path_to_root, $dflt_lang
, $login_delay
;
$this->set_company($company);
$this->logged = false;
$this->set_company($company);
$this->logged = false;
@@
-76,7
+77,8
@@
class current_user
if (!isset($Auth_Result)) // if not used: standard method
$Auth_Result = get_user_auth($loginname, md5($password));
if (!isset($Auth_Result)) // if not used: standard method
$Auth_Result = get_user_auth($loginname, md5($password));
- write_login_filelog($loginname, $Auth_Result);
+ if ($login_delay > 0)
+ write_login_filelog($loginname, $Auth_Result);
if ($Auth_Result)
{
if ($Auth_Result)
{
@@
-129,6
+131,7
@@
class current_user
$this->username = $this->loginname;
$this->prefs = new user_prefs($myrow);
$this->user = @$myrow["id"];
$this->username = $this->loginname;
$this->prefs = new user_prefs($myrow);
$this->user = @$myrow["id"];
+ $this->email = @$myrow["email"];
update_user_visitdate($this->username);
$this->logged = true;
$this->last_act = time();
update_user_visitdate($this->username);
$this->logged = true;
$this->last_act = time();
@@
-630,6
+633,14
@@
function array_search_key($needle, $haystack, $valuekey=null)
return @$keys[0];
}
return @$keys[0];
}
+// Recalculate report columns if orientation is landscape.
+function recalculate_cols(&$cols)
+{
+ $factor = (user_pagesize() == "A4" ? 1.4 : 1.3);
+ foreach($cols as $key => $col)
+ $cols[$key] = intval($col * $factor);
+}
+
function flush_dir($path, $wipe = false)
{
$dir = opendir($path);
function flush_dir($path, $wipe = false)
{
$dir = opendir($path);