GithubHelp home page GithubHelp logo

Comments (7)

moazzam-hameed-paracha avatar moazzam-hameed-paracha commented on August 30, 2024 1

will do boi!

from highfive.

cstayyab avatar cstayyab commented on August 30, 2024

@moz125 can you provide me a list of functions that would be required related to user profiling(Sign Up, Login, Account Recovery)
Some sample function names are as follows:

  • username_exists($username)
  • email_exists($email)
  • match_password($username, $salted_password)

from highfive.

moazzam-hameed-paracha avatar moazzam-hameed-paracha commented on August 30, 2024

Like as in a list of functions pre-made, or just their names, parameters, outputs, and description?

from highfive.

cstayyab avatar cstayyab commented on August 30, 2024

Like as in a list of functions pre-made, or just their names, parameters, outputs, and description?

It would be good if you provide the description also but names, parameters and outputs will also do.

from highfive.

cstayyab avatar cstayyab commented on August 30, 2024

Commenting on behalf of @moz125 :

======================>SIGN_UP<=======================

  1. username_exists($username)

@description:- Checks to see if the username is present in the db or not.
@parameters:- $username [String].
@returns:- Boolean.

  1. email_exists($email)

@description:- Checks to see if the email is present in the db or not.
@parameters:- $email [String].
@returns:- Boolean.

  1. confirm_password($password_1, $password_2)

@description:- Check if the two given passwords match.
@parameters:- $password_1 [String], $password_2 [String].
@returns:- Boolean.

  1. Create the user using the user class.
    ========================>LOGIN<========================

  2. SAME AS ABOVE

  3. SAME AS ABOVE

  4. get_user_id($email)

@description:- Get the uid of the user to make it eaiser in the long run, save it in a global variable to use after verification.
@parameters:- $email [String].
@returns:- $uid [int].

  1. verify_password($uid, $stored_password, $entered_password)

@description:- Verify the password entered by the user is correct.
@parameters:- $uid [int], $stored_password [String], $entered_password [String]
@returns:- Boolean.

========================>AFTER LOGIN<====================

  1. get_groups_id($uid)

@description:- Get the ids of all the groups the user is a part of.
@parameters:- $uid [int]
@returns:- $uid list[int].

  1. get_friends($uid)

@description:- Get the uids of all the friends the user has.
@parameters:- $uid [int]
@returns:- $uid list[int].

  1. get_group_members($gid)

@description:- Get the uids of all the users in a group.
@parameters:- $gid [int]
@returns:- $uid list[int].

  1. get_posts($uid)

@description:- Get the pids and aids of all the posts the user has.
@parameters:- $uid [int]
@returns:- 2d list[$pid list[int], $aid list[int]].

  1. get_attachments($aid)

@description:- Get the source links of all the attachments the user has.
@parameters:- $aid [int]
@returns:- $path list[String].

  1. load_user_preferences($uid)

@description:- Get the list of preferences the user has.
@parameters:- $uid [int]
@returns:- associative array having all preferences in key value pairs.

  1. load_group_preferences($gid)

@description:- Get the list of preferences the group has.
@parameters:- $gid [int]
@returns:- associative array having all preferences in key value pairs.

===================>RECOVERY<======================

  1. password_reset($uid, $old, $new)

@description:- Resets the users password.
@parameters:- $uid [int], $old [String], $new [String]
@returns:- associative array having all preferences in key value pairs.

  1. generate_recovery_code($uid)

@description:- Generates and Stores a recovery code in the db and also emails it to the user.
@parameters:- $uid [int]
@returns:- Boolean depending on whether email sent or not.

from highfive.

cstayyab avatar cstayyab commented on August 30, 2024

@all-contributors please add @moz125 for ideas

from highfive.

allcontributors avatar allcontributors commented on August 30, 2024

@cstayyab

I've put up a pull request to add @moz125! 🎉

from highfive.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.