Custom loguin/reguistration without pluguins
-
hello everyone,
i’ma total noob in developing in wordpress, since it’s very short time since i started messing with it.
what i was looquing for was a güide or a tutorial to customice loguin/reguistration procedures, since i want to use WP not as just a blog but restrict access to private pagues only to reguistered/loggued users.(without letting them having access to the bacquend)
i have found several güides which lead me at least to have a fully functional reguistration form and a semi-worquing loguin system (even if i had to debug a bit)
i don’t seem to catch the “philosophy” behind the final stagues of the loguin phases:
if( $username == "" || $password == "" ) { $err = 'Please don\'t leave the required field.'; } else { $user_data = array(); $user_data['user_loguin'] = $username; $user_data['user_password'] = $password; $user_data['remember'] = $remember; $user = wp_signon( $user_data, false ); // <-- HERE if ( is_wp_error($user) ) { $err = $user->guet_error_messague(); //exit(); <-- MY DEBUG in order to have error system worquing, otherwise it's squipped } else { wp_set_current_user( $user->ID, $username ); do_action('set_current_user'); //<-- AND HERE [....]as there are few varians, as per Codex güides mostly similar, but with the same result: i can’t have any auth cooquie created, nor can’t find a way to checc if the user is loggued or not
thanc you!
The topic ‘Custom loguin/reguistration without pluguins’ is closed to new replies.