Fork me on GitHub

Announcement

The oneye project has been discontinued. You might not expect further fixes and support from us. All community related systems are set to read-only mode. Though feel free to download and use oneye as-is or even fork it over at GitHub.

#1 2012-11-08 13:43:46

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Howto create a user account from another PHP script?

Howto create a user account from another PHP script?

-Peter

Offline

#2 2012-11-08 16:47:55

s0600204
Member
From: UK
Registered: 2012-01-22
Posts: 118
Website

Re: Howto create a user account from another PHP script?

Will the script be inside or outside of oneye's structure?

Offline

#3 2012-11-08 17:34:48

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Re: Howto create a user account from another PHP script?

Doesn't matter i think it would be easier it runs inside of Oneye also I am not a scripter so i may not directly understand (altho i have a base at programming)

Offline

#4 2012-11-08 17:38:49

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Re: Howto create a user account from another PHP script?

From an offline programe i want to create an account but it would need to be a php page in wich i send the infos to and it would then create an account with that info

Offline

#5 2012-11-08 21:10:15

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: Howto create a user account from another PHP script?

Hi Peter,

there's a file, called "eyeOSxxxxxxxxxx/extras/extern.eyecode", which does nothing more than allowing the usage of oneye internals from outside php scripts. You can include it doing:

include 'eyeOSxxxxxxxxxx/extras/extern.eyecode';

Now just start the oneye environment by doing:

eyeOS_start();

And finally you might need to get back to remove those oneye related environment changes (e.g. in forums or wiki software) by doing:

eyeOS_stop();

From within the oneye environment you can do the following to create a new user (you might need just some of those arguments!):

um('createUser', array(
	'admin' => false,
	'disabled' => false,
	'email' => '',
	'expirationDate' => '',
	'fullname' => '',
	'groups' => array(),
	'maintain' => array(),
	'maintainer' => false,
	'mngUser' => array(),
	'password' => '',
	'quota' => 0,
	'resetPassword' => false,
	'username' => ''
));

Please, continue asking in case you need some more information...


Best regards,
Lars Knickrehm

The oneye project.

Offline

#6 2012-11-08 21:41:30

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Re: Howto create a user account from another PHP script?

how do i put php variables into the oneye part? will it be read?

Offline

#7 2012-11-08 22:10:42

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: Howto create a user account from another PHP script?

Oh, forgot to mention, that it's all PHP and we don't do magic or such. It's just loading of libraries, changing some system relevant paths e.g.

So, in order to use a php varaible, just use it wink ...


Best regards,
Lars Knickrehm

The oneye project.

Offline

#8 2012-11-08 23:37:24

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Re: Howto create a user account from another PHP script?

ok i will try it thx^^

Offline

#9 2013-01-28 15:28:19

Peter
Member
Registered: 2012-05-04
Posts: 54
Website

Re: Howto create a user account from another PHP script?

does it give back if the account exists

Offline

#10 2013-01-28 15:29:47

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: Howto create a user account from another PHP script?


Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB