Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
bb0a7a6a
Commit
bb0a7a6a
authored
10 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT
#1479
fix some bug
parent
9f93a524
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ldap/trunk/process_users_entities_to_maarch.php
+14
-4
14 additions, 4 deletions
ldap/trunk/process_users_entities_to_maarch.php
with
14 additions
and
4 deletions
ldap/trunk/process_users_entities_to_maarch.php
+
14
−
4
View file @
bb0a7a6a
...
...
@@ -266,6 +266,16 @@ function infoBalise($description, $balise)
function
insertUserEntity
(
$pseudo
,
$entity_id
,
$db
){
$is_primary
=
'Y'
;
$qry
=
$db
->
prepare
(
"SELECT * from users_entities where user_id = ?"
);
$qry
->
execute
(
array
(
$pseudo
));
$result
=
$qry
->
fetchAll
();
if
(
empty
(
$result
)){
$is_primary
=
'Y'
;
}
else
{
$is_primary
=
'N'
;
}
$qry
=
$db
->
prepare
(
"SELECT * from users_entities where user_id = ? and entity_id = ? "
);
$result
=
null
;
$qry
->
execute
(
array
(
$pseudo
,
$entity_id
));
...
...
@@ -274,13 +284,13 @@ function infoBalise($description, $balise)
if
(
$result
!=
null
){
echo
"les donnees de users_entities sont a jour
\n
"
;
}
else
{
echo
"les donnes de users_entities doivent etre mis a jour!"
;
$qry2
=
$db
->
prepare
(
"INSERT into users_entities (user_id,entity_id, primary_entity) values (?,?,
'Y'
)"
);
$result2
=
$qry2
->
execute
(
array
(
$pseudo
,
$entity_id
));
echo
"les donne
e
s de users_entities doivent etre mis a jour!"
;
$qry2
=
$db
->
prepare
(
"INSERT into users_entities (user_id,entity_id, primary_entity) values (?,?,
?
)"
);
$result2
=
$qry2
->
execute
(
array
(
$pseudo
,
$entity_id
,
$is_primary
));
//print_r($qry2->errorInfo());
$result2
=
$qry2
->
fetchAll
();
if
(
$result2
==
null
){
echo
"Error, aucun
e
users_entities n'a ete ajoute
\n
"
;
echo
"Error, aucun users_entities n'a ete ajoute
\n
"
;
}
else
{
echo
"Insertion du users_entities effectue!
\n
"
;}
}
}
...
...
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