Fork me on GitHub

#1 2015-10-12 07:57:03

lavvaf
Member
Registered: 2015-10-09
Posts: 29

New filed for Users

Hi everyone,

I looking for add new filed in user registration form (es. Phone Number, National Code, Gender, etc...).
May I ask you help me to customize the Oneye?

Thanks

Offline

#2 2015-10-13 23:38:24

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

Re: New filed for Users

Ouch, shouldn't be that an easy job. You'll need to add the label and textbox widgets to the login form inside "system_xxxxxxxxxx/apps/eyeLogin/themes/default/window.eyecode".

After that edit "system_xxxxxxxxxx/extern/apps/eyeLogin/themes/default/eyeLogin.js". There seem to be three parts, in which the "Create" callback is called. Add your new textbox to transfer its data to the server.

Finally handle those fields inside that "Create" callback on the server side over at "system_xxxxxxxxxx/apps/eyeLogin/events.eyecode".

Eventually update "system_xxxxxxxxxx/extern/apps/eyeX/themes/default/css/apps/eyeLogin/eyeLogin.css".

If you need some more help, don't hesitate to ask.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#3 2015-10-14 13:55:22

lavvaf
Member
Registered: 2015-10-09
Posts: 29

Re: New filed for Users

Dear Lars,

Thanks for your support. Your information is very useful.

Thanks a lot!!!!

Offline

#4 2015-10-22 00:26:13

lavvaf
Member
Registered: 2015-10-09
Posts: 29

Re: New filed for Users

lars-sh wrote:

Ouch, shouldn't be that an easy job. You'll need to add the label and textbox widgets to the login form inside "system_xxxxxxxxxx/apps/eyeLogin/themes/default/window.eyecode".

After that edit "system_xxxxxxxxxx/extern/apps/eyeLogin/themes/default/eyeLogin.js". There seem to be three parts, in which the "Create" callback is called. Add your new textbox to transfer its data to the server.

Finally handle those fields inside that "Create" callback on the server side over at "system_xxxxxxxxxx/apps/eyeLogin/events.eyecode".

Eventually update "system_xxxxxxxxxx/extern/apps/eyeX/themes/default/css/apps/eyeLogin/eyeLogin.css".

If you need some more help, don't hesitate to ask.

Dear Lars,
I added additional field in eyeLogin and create a new user successfully, but I want to save this information too. Like Password, Email and etc I want to save Gender, National code and etc.
Here is my sample:

<eyeUser>
	<username>a.lavvaf</username>
	<password>66efea5c89f829234db28b2d413cd9</password>
        <nationalcode>1111111111</nationalcode>
        <gender>male</gender>
	<email>lavvaf@gmail.com</email>
	<quota>1073741824</quota>
	<fullname>Alireza Lavvaf</fullname>
	<createDate>1444059917</createDate>
	<expirationDate>0</expirationDate>
	<disabled>0</disabled>
	<group>public</group>
	<lastLogin>1445151320</lastLogin>
</eyeUser>

Offline

#5 2015-10-23 04:00:26

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: New filed for Users

I wanted to do something similar, yet I only wanted the 4 main parts.  User ID, Password, Real Name and Email.   When you get your new login figured out can you help me?  I'm also adding facebook login.  If that goes well, I might try google+ login also.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#6 2015-10-23 04:03:45

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: New filed for Users

I just noticed, but the system already saves create date and last login time, somewhere.  It shows up when you go to manage users and possibly a few of the other data are options in user settings.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#7 2015-10-24 13:14:23

lavvaf
Member
Registered: 2015-10-09
Posts: 29

Re: New filed for Users

Wolfy wrote:

I just noticed, but the system already saves create date and last login time, somewhere.  It shows up when you go to manage users and possibly a few of the other data are options in user settings.

Dear Wolfy,
I found the solution! We should have some changes in eyeos.eyecode at line 95 in this path:
system_xxxxxxxxxx/system/services/um/modules/eyeos.eyecode
And add new properties of user information.
for example for save user mobile number, we have:

     $array['mobile'][0] = $params['mobile'];

Now when create a new user we can save mobile information in xml:

<eyeUser>
	<username>b.test</username>
	<password>66effa5c89f829d111ed542b2d413cd9</password>
	<email />
	<quota />
	<mobile>9999999999</mobile>
	<fullname />
	<createDate>1445683956</createDate>
	<expirationDate>0</expirationDate>
	<group>basic</group>
	<disabled>0</disabled>
	<lastLogin>1445683956</lastLogin>
</eyeUser>

Offline

#8 2015-10-26 15:34:31

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

Re: New filed for Users

Sorry for that late answer. You're absolutely right to modify that "um" (users management) service. In order to minimize problems when updating oneye, I recommend you to create an additional storage for those things, but don't mind.


Best regards,
Lars Knickrehm

The oneye project.

Offline

#9 2015-10-28 20:53:42

lavvaf
Member
Registered: 2015-10-09
Posts: 29

Re: New filed for Users

Dear Lars,
Thanks for your recommend. Your answers are very useful for me.
Thanks man.

Offline

Board footer

Powered by FluxBB