Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
f5763642
Commit
f5763642
authored
Apr 28, 2010
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Qual: Uniformise code. user class use id in first param of fetch
parent
00a1ebe4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/user/user.class.php
+3
-21
3 additions, 21 deletions
htdocs/user/user.class.php
with
3 additions
and
21 deletions
htdocs/user/user.class.php
+
3
−
21
View file @
f5763642
...
...
@@ -577,8 +577,8 @@ class User extends CommonObject
}
/**
* \brief Change statu
t d'un utilisateu
r
* \return int <0
si ko
, >
=
0
si ok
* \brief Change statu
s of a use
r
* \return int <0
if KO, 0 if nothing is done
, >0
if OK
*/
function
setstatus
(
$statut
)
{
...
...
@@ -1673,23 +1673,6 @@ class User extends CommonObject
{
global
$user
,
$langs
;
// Charge tableau des id de societe socids
$socids
=
array
();
$sql
=
"SELECT rowid FROM "
.
MAIN_DB_PREFIX
.
"societe WHERE client=1 LIMIT 10"
;
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
$num_socs
=
$this
->
db
->
num_rows
(
$resql
);
$i
=
0
;
while
(
$i
<
$num_socs
)
{
$i
++
;
$row
=
$this
->
db
->
fetch_row
(
$resql
);
$socids
[
$i
]
=
$row
[
0
];
}
}
// Initialise parametres
$this
->
id
=
0
;
$this
->
ref
=
'SPECIMEN'
;
...
...
@@ -1714,8 +1697,7 @@ class User extends CommonObject
$this
->
datepreviouslogin
=
time
();
$this
->
statut
=
1
;
$socid
=
rand
(
1
,
$num_socs
);
$this
->
societe_id
=
$socids
[
$socid
];
$this
->
societe_id
=
1
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment