userfrosting / UserFrosting

Modern PHP user login and management framework
https://www.userfrosting.com
Other
1.64k stars 366 forks source link

Need phone column to be added #103

Closed johanvena closed 10 years ago

johanvena commented 10 years ago

Hi, I need to add a cellphone input on register form and write to database and need to verify it does not exist like email, need to edit master file before deploying have done the following manually but when submit it fails to write phone number to database. I think I miss something

Before deploying 1.) install_db.php - Add after line 156 =====> phone varchar(10) NOT NULL,

After deploying 1.) register.php - Add after line 130 =====>

```


2.) register.php   -  Add after line 212  =====>
phone:          form.find('input[name="phone"]' ).val(),

3.) forms/form_user.php   -   After line 99 =====>
$phone = "";

4.) forms/form_user.php   -  After line 110  =====>
$phone = $user['phone'];

5.) forms/form_user.php   -  After line 192 Add  =====?
 <div class='col-sm-6'>
        <h5>Phone</h5>
        <div class='input-group'>
            <span class='input-group-addon'><i class='fa fa-phone'></i></span>
            <input type='text' class='form-control' name='phone' autocomplete='off' value='$phone' data-validate='{\"minLength\": 12, \"maxLength\": 12, \"label\": \"Phone\" }' $disable_str>
        </div>
    </div>

Highly appreciate if you can help
Johan
johanvena commented 10 years ago

Just notice that copied code get wrongly displayed

johanvena commented 10 years ago

Screenshots 1 2

alexweissman commented 10 years ago

@johanvena I'm working on a basic FormBuilder system that should make it a little easier to add new user fields. Can you wait a day or two for me to release these changes?

johanvena commented 10 years ago

Fine, I will wait on another note is it possible to add profile pic and crop I am using - Fancy profile image upload and crop - http://wsnippets.com/fancy-profile-image-upload-crop-jquery-ajax-php/ it is lightweight, easy and out of the box Thanxs

lilfade commented 10 years ago

Profile pics seem like a good idea, it's actually on my to do list (which i swear gets bigger daily >_> ) none the less if you would like to implement it that would be great otherwise i was looking to do profiles, and social logins at the same time. Although i'd like to get the pm system done before i start on something else.

johanvena commented 10 years ago

It’s fine, will wait for new pm and see how to integrate wsniper.com script, when will you release new pm

From: Bryson [mailto:notifications@github.com] Sent: 28 August 2014 08:09 AM To: alexweissman/UserFrosting Cc: johanvena Subject: Re: [UserFrosting] Need phone column to be added (#103)

Profile pics seem like a good idea, it's actually on my to do list (which i swear gets bigger daily >_> ) none the less if you would like to implement it that would be great otherwise i was looking to do profiles, and social logins at the same time. Although i'd like to get the pm system done before i start on something else.

— Reply to this email directly or view it on GitHub https://github.com/alexweissman/UserFrosting/issues/103#issuecomment-53677294 . https://github.com/notifications/beacon/8571962__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNDgyNTMyNCwiZGF0YSI6eyJpZCI6NDA4Njg1MDh9fQ==--3cfebf8e02c4fa15f8d887040a55baa787f60bbc.gif


This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com

lilfade commented 10 years ago

The main part of the pm plugin is up on it's repo your more then welcome to test it out if you would like although it will not be a profile type of thing, this is more of a site enhancment rather then a profile system. It has some issues at the moment but it works as it is just needs a bit of love yet to make everything jive like i want it to. you can see it here - https://github.com/lilfade/UF-PMSystem/

But i advise against posting support requests here in the Userfrosting repo as we want to keep everything separated.

johanvena commented 10 years ago

What is the progress on basic Form Builder System to add new user fields

alexweissman commented 10 years ago

Working on it right now. I'm hoping to have it done before I stop for the night, but no guarantees. In the meanwhile, check out the TableBuilder class as part of my new bootsole project. This will be the home for the TableBuilder and FormBuilder classes that will be integrated into UserFrosting.

johanvena commented 10 years ago

How do you integrate into userfrosting

alexweissman commented 10 years ago

I'll be doing that myself in the next push.

alexweissman commented 10 years ago

@johanvena should be ready to go, just grab the latest push.

johanvena commented 10 years ago

Thanxs will do

johanvena commented 10 years ago

Can you please direct me which files I need to edit to add phone number to form and table I have edit register.php and add code after line 104 and 181 its working and show Edit form_user.php after line 146 and line 323 add phone details Edit table_user.php after line 46 add phone div but not creating & writing to table

alexweissman commented 10 years ago

For now, you'll need to modify the db_functions.php and secure_functions.php files to perform CRUD (create, read, update, delete) on your new fields. Please see https://github.com/alexweissman/UserFrosting/wiki/Adding-a-user-field for details about which functions I had to modify.

Hopefully we'll have an ORM up and running soon, and we can take some of the work out of this.

alexweissman commented 10 years ago

Ok, looks like this is wrapped up.