Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
sucs-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Imran Hussain
sucs-site
Commits
c2f7394d
Commit
c2f7394d
authored
Feb 13, 2016
by
Laurence Sebastian Bowes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes. Happy with this code now.
parent
080478fe
Pipeline
#87
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/member_functions.php
lib/member_functions.php
+4
-4
No files found.
lib/member_functions.php
View file @
c2f7394d
...
...
@@ -41,14 +41,14 @@ function generateUid()
while
(
$ok
==
false
)
{
//generate random number between 00000 and 99999
$uid
=
sprintf
(
"%0
6
d"
,
mt_rand
(
0
,
99999
));
$uid
=
sprintf
(
"%0
5
d"
,
mt_rand
(
0
,
99999
));
//
id return 1 for error (safe to take). 0 for su
cess (taken) not safe
shell_
exec
(
"id "
.
$prefix
.
$uid
,
$output
,
$returnVal
);
//
id return 1 for error (safe to take). 0 for suc
cess (taken) not safe
exec
(
"id "
.
$prefix
.
$uid
,
$output
,
$returnVal
);
//check the result of id
if
(
$returnVal
==
1
)
{
// We have a unused one!
// We have a
n
unused one!
$ok
=
true
;
$safeuid
=
$prefix
.
$uid
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment